Randomized and Graph-Theoretic Method

Assignment Help Data Structure & Algorithms
Reference no: EM132681919

Programming Assignment

Topic: Randomized & Graph-Theoretic Method

Consider a collection of M lightbulbs and N switches. The switches can be placed either in a down or up position. Each lightbulb is connected to two of the switches and it can only be turned off if the two switches connected to it assume a specific configuration.

We ask if there is a configuration of the switches (down or up for each) so that all of the lightbulbs are on simultaneously.

Suppose we represent the N switches as integers 1 through N. We represent each lightbulb as a pair of integers which encodes the configuration which avoids the lightbulb to be turned off. We will encode the up and down positions by using positive and negative integers. So, if a lightbulb is represented by the pair (i, -j), then this means the lightbulb is connected to switches i and j. If switch i is in the down position and switch j is in the up position, then the lightbulb is off, otherwise the lightbulb will be on.

PROBLEM
Given an instance of this lightbulb problem, determine if there is a configuration of the switches so that all lightbulbs are simultaneously on. If the answer is YES, then provide the sequence of up/down for each switch. If the answer is NO, provide a "proof" of this fact.

Attachment:- Programming Assignment.rar

Reference no: EM132681919

Questions Cloud

Discussion is online education efficient for students : Is online education efficient for students in Hong Kong and Explain whether the argument agrees or disagrees
Describe acceptable types of education and training : You are the HR Manager for the Pleasantville School District. Although it hadn't done so before, the district recently implemented a person-focused pay program.
Explain proposed capital structure of the firm : FCOJ, Inc., a prominent consumer products firm, is debating whether or not to convert its all-equity capital structure to one that is 30 percent debt.
What is the interest tax shield-tatum co : Tatum Co. has a 25 percent tax rate. Its total interest payment for the year just ended was $30.3 million. What is the interest tax shield?
Randomized and Graph-Theoretic Method : Randomized and Graph-Theoretic Method - determine if there is a configuration of the switches so that all lightbulbs are simultaneously on
Business valuations - contemporary studies : Business valuations - Contemporary Studies in Economic and Financial Analysis Mergers and Acquisitions
Evaluate fairness of company current compensation system : You have recently been hired as the HR manager of a small furniture manufacturing company that has 63 employees. These employees include everyone from line work
Describe the civil right rights act : The Civil Right Rights Act of 1964. Please discuss the chosen topic. You should tell (1) why it is important, (2) how it has impacted the workforce.
What concrete situations in your workplace might give rise : What concrete situations in your workplace might give rise to ethical dilemmas? Does the professional code of conduct provide any relevant guidance for these.

Reviews

len2681919

10/30/2020 10:53:34 PM

please read the programming assignment requirements and give me an estimate of how many days to complete the program

Write a Review

Data Structure & Algorithms Questions & Answers

  Review the brief intervention flow chart

Review the brief intervention flow chart. What would be easy for you to adapt and what would be more challenging for you to adapt as a SUD counselor

  Write algorithm that allows the customer to enter amount

An ATM allows a customer to withdraw a maximum of $500 per day. If a customer withdraws more than $300, the service charge is 4% of the amount over $300.

  Determine if a string s is a palindrome

What data structure is most suitable to determine if a string s is a palindrome, that is, it is equal to its reverse.

  Create an avl tree using data entered as a sequential set

Create an AVL tree using the following data entered as a sequential set. Show the balance factors in the resulting tree:

  Write a function that reads a table of letters

Write a function that reads a table of letters and their weights and constructs a Huffman code for these letters.

  Algorithm to compute-report grade-point average for class

Compute and report grade-point average for class. Determine the sum of the grades; count number of students; compute average. Determine its algorithm?

  What are the basic functions used in encryption algorithms

What are the two basic functions used in encryption algorithms? How many keys are required for two people to communicate via a symmetric cipher?

  Compare flat and gouraud shading algorithms

Explain, in your own words, how the Phong illumination model works and what its strong and weak features are.

  Input a list of employee names and salaries and determine

input a list of employee names and salaries and determine the meanaverage salary as well as the number of salaries

  You need to find the smallest array and see a segment fault

Write me a function that finds the smallest item in an ArrayBag (by reference) and returns true if the arrayBag is not empty and false otherwise.

  Analyze how the chart and pseudocode was created

Fill in the following table by walking through the logic above.The idea is to analyze how the chart and pseudocode was created, because you will be doing this in a few minutes

  Is an array that is in reverse sorted order a heap

What is the expectation of the index of the maximum element in the array and expectation of the index of the minimum element in the array?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd