Hi Everyone,

Is there anyone who can help me with Ordered Binary Decision Diagrams in Java. Do you know how to draw a simple Ordered Binary Decision Diagram usinh Java?

Any help will be appriciated.


Recommended Answers

All 10 Replies

Are you talking about ROBDD or just BDD?

Are you talking about ROBDD or just BDD?

I am talking about ROBDD.

OK, in your first post, you talked about "drawing," does that mean you have already had a built data set? Or you have only raw data to be built and draw? Also, drawing means you want to represent it in GUI? Or you are talking about how to build a diagram? If you are talking about drawing only, you may use Graphic2D to display the nodes and arrows. If you are talking about algorithm to build, it will be more difficult.

Hi taywin,

Actually I havent started my project yet, I am still researching and trying to find the right approach to implement it. My project is to design and implement a visual representation tool for ordered binary decision diagrams (OBDDs), and four of the basic algorithms reduce, restrict, apply, and exists. I am wondering how this binary decision diagrams will be represented usinh Java.

I will look into the Graphic2D thanks for that and also I found something called JavaBDD is that something different? or did you heard about it at all?


If you could find a tool to draw diagram for you, it would be great. The real problem is not the graphic to display a diagram, but it is the algorithm to arrange nodes and draw lines that has least possible to cross over other lines.

If you want to start, you could start with a simple GUI as in this link sample http://www.roseindia.net/java/example/java/awt/arcs-drawing-in-java.shtml. Not the best, but should give you some idea. Then to draw different line type, this thread should answer you http://www.daniweb.com/software-development/java/threads/130876.

You see that what you need is to arrange your node and line. If you need to do it dynamically, that could be the most difficult problem for you to solve right now.

thank you so much, yes problem is t find a way to draw the diagram dynamically based on the given formula.. but at the moment i am just trying to learn how to draw this diagram manually using java2D. I am not sure if thats the best way to start?

If you are going to do it without any other tools, then I guess it is the way to go. I do not know a tool that help you draw a diagram in Java, but I am sure there are some out there. The problem is that if there is any that is open sources... :(

do you thinks Java2D is not the best approach for drawing these binary decision diagrams..

It could give you an idea, but it could be messy easily if your algorithm of arranging nodes are not well done. Think about lines crossing all over the place. There is a research paper done in an algorithm to find an empty space in a space. But that could be used just a part of finding a location for your node to be placed.

Anyway, you could try Java2D first and draw only a line from one to the other node. See how it works. Then add some Arcs to it and see how it works. You may find a way to draw it without having too many crossing lines. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.