simple computer science T OR F question State if the followi
simple computer science T OR F question
State if the following statements are true or false by filling the blanks with T (for true) or F (for false) (i)All correct algorithms are efficient as well. There are problems for which efficient algorithms do not exist. (ii) Sequential search is always the fastest algorithm for checking if the given sorted list has the given element. An algorithm that finds the area of a house with only polygonal rooms by adding the areas of the circles enclosing the polygons is correct. An algorithm that finds the area of a rectangle by splitting the rectangle into four triangles and adding their areas is highly efficient. The worst case for sequential search is the best case for binary search for any sorted list to be searched to find if any given element is in it (iii) (iv) (v) (vi) (vii) Incorrect algorithms can cause loss of money (vii) Inefficient algorithms can lead to higher waiting time for users of a software., (ix) Binary search is a search that finds the greatest element in the given list. (x) Sequential search is the search that finds the least element in the given list.Solution
1) False not all correct algorithm are efficient , logically a algorithm might be achieving the required goal but take a lot of time.
2) Yes there are some problems for which efficient algorithms are not present such as NP-hard problems.
3) Yes in case the given list is sorted.
7) Yes incorrect algorithm will definitely cause loss of money as logically it will produce wrong output, so we fail to meet requirement , time waste, resources waste hence money waste.
8) Yes we say inefficient algorithm that means algorithm which takes lot of time and the consumer needs to wait for long.
9) Binary search is not the method to find greatest element in th elist , its a search method to find any element in the list.
10) No sequential doesnot find the least element , it finds the element given to be found in a list
