Question
On each face of each block a letter is written (any one from English alphabet). You need to find out, is it possible to form
On each face of each block a letter is written (any one from English alphabet). You need to find out, is it possible to form a given word from the blocks? For example, suppose that you have 5 blocks: B1: MXTUAS B_2: O Q A T G E B3: RE WMN A B4: M B D F A C B5:I J K G D E (Here for each block the list of letters written on its faces is given) You can write the word "MAMA" using this set of blocks: M A M A B3 B_2 B4 B1 At the same time, you cannot form the word "SUN". You have all 3 letters "S", "U" and "N" on the blocks, but the letters "S" and "U" are on the same block B1, and you cannot use it twice (or more) for one word. What is this algorithmic problem? Is it possible to solve it in a polynomial time?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started