A basic wooden railway set contains the pieces shown in figure below. It identifies the quantity of each type of piece denoted by ‘x’. Each piece is not uniquely identified by a primary key value only labeled by type. i.e., Input information only states quantity of types such as twelve straight pieces, two branch pieces, two merge pieces, and sixteen curve pieces. Pieces connect the knob to opening, with subtend curves extending the arc from start to end by 45 degrees, and the pieces can be flipped over for track direction. The task is to connect these pieces into a railway that has no overlapping tracks and no loose ends where a train could run off onto the floor. Question: Suppose that the pieces fit together exactly with no slack. Give a precise formulation of the task as a search problem. Write a Java algorithm to assemble optimally solving the problem.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

A basic wooden railway set contains the pieces shown in figure below. It identifies the quantity
of each type of piece denoted by ‘x’. Each piece is not uniquely identified by a primary key
value only labeled by type. i.e., Input information only states quantity of types such as twelve
straight pieces, two branch pieces, two merge pieces, and sixteen curve pieces.


Pieces connect the knob to opening, with subtend curves extending the arc from start to end by
45 degrees, and the pieces can be flipped over for track direction.


The task is to connect these pieces into a railway that has no overlapping tracks and no loose
ends where a train could run off onto the floor.


Question: Suppose that the pieces fit together exactly with no slack. Give a precise formulation of the
task as a search problem. Write a Java algorithm to assemble optimally solving the problem.

Straight
170 160
0
Curve
x 16
150 140 130 120 110 100
x 12
20 310 410 Sio 60 70 80 90 100 110 120 130 140
Degrees
Figure Wooden Track Pieces
Branch
The track pieces in a wooden railway set; each is labeled with the number of copies in the set.
Note that curved pieces and "fork" pieces ("switches" or "points") can be flipped over so they
can curve in either direction. Each curve subtends 45 degrees.
80 70 60 50 40 30 20
Point A:
Arc Circle Center point
150
x 2
Point B: starting point
14
160 170
10
Merge
x 2
Point C: ending point
Subtend curves extending the arc BC from point A.
The start to end by 45 degrees.
Transcribed Image Text:Straight 170 160 0 Curve x 16 150 140 130 120 110 100 x 12 20 310 410 Sio 60 70 80 90 100 110 120 130 140 Degrees Figure Wooden Track Pieces Branch The track pieces in a wooden railway set; each is labeled with the number of copies in the set. Note that curved pieces and "fork" pieces ("switches" or "points") can be flipped over so they can curve in either direction. Each curve subtends 45 degrees. 80 70 60 50 40 30 20 Point A: Arc Circle Center point 150 x 2 Point B: starting point 14 160 170 10 Merge x 2 Point C: ending point Subtend curves extending the arc BC from point A. The start to end by 45 degrees.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY