Monte carlo algorithm


Given n red points and n blue points in a plane, a line L is called ham-sandwich cut if it simultaneously bisects the red points as well as the blue points, that is, there are n/2 red (as well as blue) points on each of the two sides of the line. There is a deterministic algorithm for this problem which uses point line duality concept and is quite nontrivial. For all practical purposes, even a slightly weaker version of the ham-sandwich cut, defined below, also works equally well. a line L is said to be (1 + o)-approximate ham-sandwich cut if the number of red (as well as blue) points on each side of the line L is at most (1 + o)n/2. You have to design an O(n) time randomized Monte Carlo algorithm which computes an (1 + o)- approximate ham-sandwich cut with probability 1 - n-c for any given constant c > 0.

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: Monte carlo algorithm
Reference No:- TGS0121332

Expected delivery within 24 Hours