Question: Explain why the following two problems are in P . Your explanation does not need to be a formal proof but should be clear enough

Explain why the following two problems are in P. Your explanation does not need to be a formal proof but should be clear enough to explain how the process runs in polynomial time and under what conditions YES and NO are output.
(a) Given an nn matrix of integers, is there a contiguous submatrix (not necessarily square) which sums to 0? Assume addition of any two integers is (1).
Solution:
(b) Given a simple, connected, unweighted, undirected graph with n3 vertices represented by an adjacency matrix A, is there a cycle of length exactly 3?
Solution:
Explain why the following two problems are in P .

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!