This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

An open qustion.

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

In my project I have requirement to solve equation like this

(oid:10) and (lid:4 or lid:3) and ( (cid:91 or cid:92) OR (oid:13 and did:50))

And need to expend it like

oid:10 and lid:4 or oid:10 and lid:3 and cid:91 or oid:10 and lid:4 or oid:10 and lid:3 and cid:92 or oid:10 and lid:4 or oid:10 and lid:3 and oid:13 and .............

Does anybody have idea or algorithm to solve this kind of problem ?
Pleases share even if you have some partial idea.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please UseAMeaningfulSubjectLine instead of something general like "An open question".

From your example it is not clear exactly what you want to do. In Boolean logic there are some equivalences, for example "A AND (B OR C)" can be written as "(A AND B) OR (A AND C)", etc. If this kind of transformation is what you want to do, then study the rules of Boolean logic.
 
Praveen Kumar Singh
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You got my requirement Jesper,
I want to expend my equation but problematically.
Only problem is i am not able to write logic for that.
I am considering expression tree right now but so far no success !
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic