logo Use CA10RAM to get 10%* Discount.
Order Nowlogo

Write A C Program That Uses The “Pebble Game” Technique To Test If An Input Graph Is Minimally Rigid (In Two Dimensions). The First Line Of The Input Will Be N, The Number Of Vertices.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Requirements:

  1. Write A C Program That Uses The “Pebble Game” Technique To Test If An Input Graph Is Minimally Rigid (In Two Dimensions). The First Line Of The Input Will Be N, The Number Of Vertices. Will Not Exceed 100. Each Of The Remaining 2– 3 Lines Will Contain Two Values In The Range 0 . . . – 1 To Designate An Undirected Edge. (Self-Loops And Parallel Edges Will Not Be Included.) Each Input Line Should Be Echoed To The Output Before Being Processed. The Last Line Of Your Output Should Be Either 1) An Indication That The Graph Is Minimally Rigid (“Laman”) Or 2) An Indication That The Last Edge Processed Is “Redundant” Along With The Set Of Vertices Giving The Rigid Subgraph For The Redundant
  2. If A Pebble Is Moved, You Should Output The Vertices On The Pebble’s
  3. Submit Your C Program On Canvas 10:45 Am (Section 004) Or 1:45 Pm (Section 003) On December 3. Comments At The Beginning Of The Source File Should Include: Your Name, Your ID Number, And The Command Used To Compile Your Code On Omega (5 Point Penalty For Non-Compliance).

Getting Started:

  1. The Input Is Easily Read By Using Scanf(). Do Not Prompt For A File Name!
  2. The Following Bar-And-Joint System Has = 6 Vertices, 2– 3 = 9 Edges, And Is Initialized With Two Pebbles At Each Vertex:
  3. The First Rule Of The Pebble Game Changes An Undirected Edge Between Vertices And To A Directed Edge From To Y. Before Applying This Rule, Both Vertices Must Have Two Pebbles. After Applying This Rule, Will Have Just One Pebble And Will Still Have Two
  4. The Second Rule Allows A Pebble To Be Moved Against The Direction Of A Path. I.E. The Path
  5. To Analyze Rigidity, The Two Rules May Be Applied In Any Order With The Goal Of Making All Edges
  6. The Following Characterizations Of Laman Give An Algorithmically Expensive Way Of Testing Rigidity:

The Edges Of A Graph G = (VEAre Independent (Non-Redundant) In Two Dimensions If And Only If No Subgraph G´ = (V´,

E´) (With N´ Vertices) Has More Than 2n´ - 3 Edges.

(Corollary) A Graph With 2n - 3 Edges Is Rigid In Two Dimensions If And Only If No Subgraph G´ (With N´ Vertices) Has More Than 2n´ - 3 Edges.

  1. Jacobs And Hendrickson  Further Developed The “Pebble Game” Technique To Test Rigidity In O⎛⎜ N2⎞⎟ Time:

Place Two Pebbles At Each Vertex. For Each Input Edge {X Y}

Attempt To Get Two Pebbles (Four Total) At Vertices X And Y. This May Be Done Using BFS (Or DFS) To Find A Directed Path To A Vertex (Other Than X Or Y) With A Pebble.  After

The Vertex Is Found, The Path Must Be Reversed. If Four Pebbles Are Achieved

Use One Pebble On X To Record The Directed Edge X ® Y. Else

// Only Three Pebbles Were Achieved For {X Y}.

{X Y} Is A Redundant Edge.

The Vertices Reached During The Last Search Induce A Rigid Subgraph. Exit(0)

// All Edges Have Been Directed . . .  Graph Is Minimally Rigid

8.Due To The Limited Number Of Edges (2- 3) And The Characteristics Of The Pebble Game, Only A Simple Table Is Needed To Store The Pebbling Status. Other Data Structures Will Be Needed To Support The Graph Search Technique That You Choose

9.Your Solution Must Take O⎛⎜N2⎞⎟ Time, So No Adjacency Matrices.

10.Inputs A.Dat And Lab5fall19.C.Dat Are Minimally Rigid. Inputs Lab5fall19.B.Dat And

Lab5fall19.D.Dat Are Not.

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

818 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

701 Answers

Hire Me
expert
Husnain SaeedComputer science

957 Answers

Hire Me
expert
Atharva PatilComputer science

908 Answers

Hire Me