Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem Statement: Consider a matrix of size N x N comprising of numbers 0 or 1.

ID: 3630609 • Letter: P

Question

Problem Statement: Consider a matrix of size N x N
comprising of numbers 0 or 1. Given such a matrix,
problem is to find the location of a given pattern. For
example, if the pattern to be searched is as follows:

X 0 0 1
0 X 0 0
X X 0 1 (X: don’t care could be 0 or 1)

then your program should identify ALL occurrences of the
above similar patterns in the entire matrix. Typical output
from your program should be displayed as follows:
=======================
Output and Statistics:
Pattern 1 found at the following location(s):
(1,4), (5,8), ….(100,605),…
Number of patterns found: 73
Time Taken: 0.000234secs
======
Pattern 2 found at the following location(s):
4
(11,4), (15,81), ….(200,201),…
Number of patterns found: 12
Time Taken: 0.000012secs
=======
Pattern 3 found at the following location(s):
NIL
Number of patterns found: 0
Time Taken: 0.0000001secs

======
Search completed!
Statistics:
Most popular pattern: <display the pattern that has most
counts> (If you have more than one display them all)
Least popular pattern: <display the pattern that has least
counts>(If you have more than one display them all)
Total time taken: 0.083456 secs

Explanation / Answer

In progress - check your inbox at deadline (28min) :)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote