• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Algorithm for match operatons in a Matrix

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys this is not quite a Programming question rather a logic question.

I have a matrix 5x5 like this :

a + b * c
* d + f +
g * h + i
+ j + k *
l + m * n

Can someone help me to find an algorithm to find all the math operations possible in this matrix?
Like :
a+b
a+d
a*d
a*b*c
a+d+f and so on.
I tried to make a Grapth data Structure but coud not find a solution.Can some one help to find this puzzle?
Thanks.
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) Turn off your computer
2) Get some paper, pencils, and erasers
3) play around with how YOU would do it, using only the above materials.
4) Once you think you know how to do it, try to explain it to a 10 year old child in such a way that THEY could do it.

Only when you have completed the above should you consider turning on your computer and writing a single line of java.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic