60 likes | 160 Views
Some Recursive Queries. List Reverse. (b) Unhappy with the results of (a), our instructor now decides that everyone above the median should get an A, and the rest should get a B.
E N D
(b) Unhappy with the results of (a), our instructor now decides that everyone above the median should get an A, and the rest should get a B. Please, write Datalog rules to compute the median and assign the grades accordingly. (To simplify the computation, assume that no two students have the same grade and we have an odd number of students.) For full credit, do this without arithmetic--correct solutions using arithmetic will only earn half credit.