[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Ordering of Blocks based on Input/Output

Subject: Ordering of Blocks based on Input/Output
From: Dan Diebolt <dandiebolt@xxxxxxxxx>
Date: Tue, 8 May 2001 10:35:33 -0700 (PDT)
input dan output
Consider the following block diagram showing five blocks 
B1 through B5 and six input-to-output connections C1 through
C6:
      C1               C2
|--|------>|  |---------------|--|
|B1|       |B2|               |B5|
|--|--.    |--|--.         .->|--|
      .        C4.         .
    C3.          .-->|--|  .C6
      .    |--|      |B4|--.
      .--->|B3|----->|--|
           |--| C5   

Starting from B1, there are only two ways to order the 
blocks so that each Block's inputs are provided by a
proceeding Block's output:

B1 , B2 , B3 , B4 , B5
B1 , B3 , B2 , B4 , B5

My problem is to produce *one* such feasible ordering of
the blocks. The attached XML fragments show how the system
has been represented. I need a method that will be fast
and efficient. How would you approach this problem?

Regards,

Dan
------------------------
<root>
 <system>
  <block>
   <name>B1</name>
   <output n="1">B1.Out1</output>
   <output n="2">B1.Out2</output>
  </block>
  <block>
   <name>B2</name>
   <output n="1">B2.Out1</output>
   <output n="2">B2.Out2</output>
  </block>
  <block>
   <name>B3</name>
   <output n="1">B3.Out1</output>
  </block>
  <block>
   <name>B4</name>
   <output n="1">B4.Out1</output>
  </block>
  <block>
   <name>B5</name>
   <output n="1">B5.Out1</output>
   <output n="2">B5.Out2</output>
  </block>

  <connect id="C1">
   <output block="B1" n="1"/>
   <input  block="B2" n="1"/>
  </connect>
  <connect id="C2">
   <output block="B2" n="1"/>
   <input  block="B5" n="1"/>
  </connect>
  <connect id="C3">
   <output block="B1" n="2"/>
   <input  block="B3" n="1"/>
  </connect>
  <connect id="C4">
   <output block="B2" n="2"/>
   <input  block="B4" n="1"/>
  </connect>
  <connect id="C5">
   <output block="B3" n="1"/>
   <input  block="B4" n="2"/>
  </connect>
  <connect id="C6">
   <output block="B4" n="1"/>
   <input  block="B5" n="2"/>
  </connect>
 </system>
</root>

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.