Finding solutions to a set of equations

Assignment Help Business Management
Reference no: EM132255083

This is the question:

Numerous engineering and scientific applications require finding solutions to a set of equations. Ex: 8x + 7y = 38 and 3x - 5y = -1 have a solution x = 3, y = 2. Given integer coefficients of two linear equations in variables x and y, use brute force to find an integer solution for x and y in the range -10 to 10.

Ex: If the input is:

8 7 38
3 -5 -1

then the output is:

3 2

Use this brute force approach:

xSolution = -99

For every value of x from -10 to 10
   For every value of y from -10 to 10
      Check if the current x and y satisfy both equations. If so, output the solution, and
      assign xSolution with x.

Check if xSolution is still -99. If so, then output "No solution".

Ex: If no solution is found, output:

No solution

The answer can be in Python. I am seriously stuck. No clue. Here's what I have.

integer xSolution

integer x

integer y

xSolution = -99

x = Get next input

y = Get next input

while x >= -10 and x <= 10 

  while y >= -10 and y <= 10

   if 8 * x + 7 * y == 38 and 3 * x - 5 * y == -1

     xSolution = x

if xSolution != -99

  Put xSolution to output

  y = Get next input

elseif xSolution == -99

  Put "No solution" to output

Reference no: EM132255083

Questions Cloud

Explore the impact of women leaders in the workplace : Describe the current status of women as leaders in two (2) of the five (5) following situations: management, politics, law, academia, or on boards.
Benefits an enterprise system would bring : You have been hired by Johnson Inc., a small company that imports and distributes an Russian sparkling water. The company is interested
Determine the material price variance : Dynatech Jewelry produced 1,580 rings during March. Determine the material price variance and the material quantity variance for March
Establishing collaborative team environment : Describe three characteristics/behaviors of individual team members that you think are most important for establishing a collaborative team environment.
Finding solutions to a set of equations : Numerous engineering and scientific applications require finding solutions to a set of equations. Ex: 8x + 7y = 38 and 3x - 5y = -1
Would this requirement be readily understood by consumer : Would this requirement be readily understood by a consumer who is not familiar with nutritional standards? Why or why not?
At what amount should the gain from the sale of the building : The prevailing rate of interest for a note of this type on January 1, 2017, was 9%. At what amount should the gain from the sale of the building be reported
Understand the role of scripting in network administration : The article in the required reading this week, "Understand the Role of Scripting in Network Administration" by Allen V Rouse
Which international trade theory would best apply : Which international trade theory would best apply and why does BMW (Germany Company) have a production plant near Greenville SC that employs nearly 9000.

Reviews

Write a Review

Business Management Questions & Answers

  Caselet on michael porter’s value chain management

The assignment in management is a two part assignment dealing 1.Theory of function of management. 2. Operations and Controlling.

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. Due to increase in the preference for light beer drinkers, Chris Prangel wants to introduce light beer version in Mountain Man. An analysis into the la..

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. An analysis into the launch of Mountain Man Light over the present Mountain Man Lager.

  Analysis of the case using the doing ethics technique

Analysis of the case using the Doing Ethics Technique (DET). Analysis of the ethical issue(s) from the perspective of an ICT professional, using the ACS Code of  Conduct and properly relating clauses from the ACS Code of Conduct to the ethical issue.

  Affiliations and partnerships

Affiliations and partnerships are frequently used to reach a larger local audience? Which options stand to avail for the Hotel manager and what problems do these pose.

  Innovation-friendly regulations

What influence (if any) can organizations exercise to encourage ‘innovation-friendly' regulations?

  Effect of regional and corporate cultural issues

Present your findings as a group powerpoint with an audio file. In addition individually write up your own conclusions as to the effects of regional cultural issues on the corporate organisational culture of this multinational company as it conducts ..

  Structure of business plan

This assignment shows a structure of business plan. The task is to write a business plane about a Diet Shop.

  Identify the purposes of different types of organisations

Identify the purposes of different types of organisations.

  Entrepreneur case study for analysis

Entrepreneur Case Study for Analysis. Analyze Robin Wolaner's suitability to be an entrepreneur

  Forecasting and business analysis

This problem requires you to apply your cross-sectional analysis skills to a real cross-sectional data set with the goal of answering a specific research question.

  Educational instructional leadership

Prepare a major handout on the key principles of instructional leadership

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