UGC NET Paper 2 (Computer Science)Hard
Given a grammar in Chomsky Normal Form, the CYK algorithm decides whether a string of length n belongs to the language in time:
- A. O(n^2)
- B. O(n^3)
- C. O(n log n)
- D. O(2^n)
Correct answer: B. O(n^3)
CYK fills an n x n table of possible non-terminals for each substring, and combining two sub-intervals at each of O(n) split points for O(n^2) cells costs O(n^3) overall.
Practise more UGC NET Computer Science and Applications questionsUGC NET Computer Science and Applications: notes and key points
More UGC NET Computer Science and Applications questions
- Which of the following problems is undecidable in general?
- The four networks 10.0.4.0/24, 10.0.5.0/24, 10.0.6.0/24 and 10.0.7.0/24 can be aggregated (route-summarised) into:
- On receiving three duplicate ACKs, TCP Reno performs:
- A link has a bandwidth of 100 Mbps and a round-trip time of 20 ms. The bandwidth-delay product, i.e. the minimum window size needed to…
- Three processes P0, P1, P2 request two resource types X and Y. Available = (2, 1). Allocation: P0 = (0, 0), P1 = (1, 0), P2 = (0, 1). Max…
- Compared to semaphores, a monitor provides: