programminga general overview in this we discuss the aims and goals of this text and briefly review programming concepts and discrete mathematics we will see that how program performs for reasonably large input is just as important as its performance on moderate amounts of input summarize the basic mathematical background needed for the rest of the book briefly review recursion summarize some important features of +that are used throughout the text what' this book aboutsuppose you have group of numbers and would like to determine the kth largest this is known as the selection problem most students who have had programming course or two would have no difficulty writing program to solve this problem there are quite few "obvioussolutions one way to solve this problem would be to read the numbers into an arraysort the array in decreasing order by some simple algorithm such as bubble sortand then return the element in position somewhat better algorithm might be to read the first elements into an array and sort them (in decreasing ordernexteach remaining element is read one by one as new element arrivesit is ignored if it is smaller than the kth element in the array otherwiseit is placed in its correct spot in the arraybumping one element out of the array when the algorithm endsthe element in the kth position is returned as the answer both algorithms are simple to codeand you are encouraged to do so the natural questionsthenarewhich algorithm is betterandmore importantis either algorithm good enougha simulation using random file of million elements and , , will show that neither algorithm finishes in reasonable amount of timeeach requires several days of computer processing to terminate (albeit eventually with correct answeran alternative methoddiscussed in gives solution in about second thusalthough our proposed algorithms workthey cannot be considered good algorithms