Microsoft

Game Central

problem solving on graph

Get step-by-step explanations

Graph your math problems

Graph your math problems

Practice, practice, practice

Practice, practice, practice

Get math help in your language

Get math help in your language

Download on App Store

  • Solve equations and inequalities
  • Simplify expressions
  • Factor polynomials
  • Graph equations and inequalities
  • Advanced solvers
  • All solvers
  • Arithmetics
  • Determinant
  • Percentages
  • Scientific Notation
  • Inequalities

Download on App Store

FIRST-DEGREE EQUATIONS AND INEQUALITIES IN TWO VARIABLES

The language of mathematics is particularly effective in representing relationships between two or more variables. As an example, let us consider the distance traveled in a certain length of time by a car moving at a constant speed of 40 miles per hour. We can represent this relationship by

We have already used word sentences and equations to describe such relationships; in this chapter, we will deal with tabular and graphical representations.

7.1 SOLVING EQUATIONS IN TWO VARIABLES

ORDERED PAIRS

The equation d = 40f pairs a distance d for each time t. For example,

if t = 1, then d = 40 if t = 2, then d = 80 if t = 3, then d = 120

The pair of numbers 1 and 40, considered together, is called a solution of the equation d = 40r because when we substitute 1 for t and 40 for d in the equation, we get a true statement. If we agree to refer to the paired numbers in a specified order in which the first number refers to time and the second number refers to distance, we can abbreviate the above solutions as (1, 40), (2, 80), (3, 120), and so on. We call such pairs of numbers ordered pairs, and we refer to the first and second numbers in the pairs as components. With this agreement, solutions of the equation d - 40t are ordered pairs (t, d) whose components satisfy the equation. Some ordered pairs for t equal to 0, 1, 2, 3, 4, and 5 are

(0,0), (1,40), (2,80), (3,120), (4,160), and (5,200)

Such pairings are sometimes shown in one of the following tabular forms.

problem solving on graph

In any particular equation involving two variables, when we assign a value to one of the variables, the value for the other variable is determined and therefore dependent on the first. It is convenient to speak of the variable associated with the first component of an ordered pair as the independent variable and the variable associated with the second component of an ordered pair as the dependent variable. If the variables x and y are used in an equation, it is understood that replace- ments for x are first components and hence x is the independent variable and replacements for y are second components and hence y is the dependent variable. For example, we can obtain pairings for equation

problem solving on graph

by substituting a particular value of one variable into Equation (1) and solving for the other variable.

Find the missing component so that the ordered pair is a solution to

if x = 0, then 2(0) + y = 4 y = 4

if x = 1, then 2(1) + y = 4 y = 2

if x = 2, then 2(2) + y = 4 y = 0

The three pairings can now be displayed as the three ordered pairs

(0,4), (1,2), and (2,0)

or in the tabular forms

problem solving on graph

EXPRESSING A VARIABLE EXPLICITLY

We can add -2x to both members of 2x + y = 4 to get

-2x + 2x + y = -2x + 4 y = -2x + 4

In Equation (2), where y is by itself, we say that y is expressed explicitly in terms of x. It is often easier to obtain solutions if equations are first expressed in such form because the dependent variable is expressed explicitly in terms of the independent variable.

For example, in Equation (2) above,

if x = 0, then y = -2(0) + 4 = 4 if x = 1, then y = -2(1) + 4 = 2 if x = 2 then y = -2(2) + 4 = 0

We get the same pairings that we obtained using Equation (1)

We obtained Equation (2) by adding the same quantity, -2x, to each member of Equation (1), in that way getting y by itself. In general, we can write equivalent equations in two variables by using the properties we introduced in Chapter 3, where we solved first-degree equations in one variable.

Equations are equivalent if:

Solve 2y - 3x = 4 explicitly for y in terms of x and obtain solutions for x = 0, x = 1, and x = 2.

Solution First, adding 3x to each member we get

2y - 3x + 3x = 4 + 3x 2y = 4 + 3x (continued)

Now, dividing each member by 2, we obtain

problem solving on graph

In this form, we obtain values of y for given values of x as follows:

problem solving on graph

In this case, three solutions are (0, 2), (1, 7/2), and (2, 5).

FUNCTION NOTATION

Sometimes, we use a special notation to name the second component of an ordered pair that is paired with a specified first component. The symbol f(x), which is often used to name an algebraic expression in the variable x, can also be used to denote the value of the expression for specific values of x. For example, if

f(x) = -2x + 4

where f{x) is playing the same role as y in Equation (2) on page 285, then f(1) represents the value of the expression -2x + 4 when x is replaced by 1

f(l) = -2(1) + 4 = 2

f(0) = -2(0) + 4 = 4

f(2) = -2(2) + 4 = 0

The symbol f(x) is commonly referred to as function notation.

If f(x) = -3x + 2, find f(-2) and f(2).

Replace x with -2 to obtain f(-2) = -3(-2) + 2 = 8

Replace x with 2 to obtain f(2) = -3(2) + 2 = -4

7.2 GRAPHS OF ORDERED PAIRS

In Section 1.1, we saw that every number corresponds to a point in a line. Simi- larly, every ordered pair of numbers (x, y) corresponds to a point in a plane. To graph an ordered pair of numbers, we begin by constructing a pair of perpendicular number lines, called axes. The horizontal axis is called the x-axis, the vertical axis is called the y-axis, and their point of intersection is called the origin. These axes divide the plane into four quadrants, as shown in Figure 7.1.

problem solving on graph

Now we can assign an ordered pair of numbers to a point in the plane by referring to the perpendicular distance of the point from each of the axes. If the first component is positive, the point lies to the right of the vertical axis; if negative, it lies to the left. If the second component is positive, the point lies above the horizontal axis; if negative, it lies below.

Graph (3, 2), (-3, 2), (-3, -2), and (3, -2) on a rectangular coordinate system.

Solution The graph of (3, 2) lies 3 units to the right of the y-axis and 2 units above the x-axis; the graph of (-3,2) lies 3 units to the left of the y-axis and 2 units above the x-axis; the graph of (-3, -2) lies 3 units to the left of the y-axis and 2 units below the x-axis; the graph of (3, -2) lies 3 units to the right of the y-axis and 2 units below the x-axis.

problem solving on graph

The distance y that the point is located from the x-axis is called the ordinate of the point, and the distance x that the point is located from the y-axis is called the abscissa of the point. The abscissa and ordinate together are called the rectan- gular or Cartesian coordinates of the point (see Figure 7.2).

problem solving on graph

7.3 GRAPHING FIRST-DEGREE EQUATIONS

In Section 7.1, we saw that a solution of an equation in two variables is an ordered pair. In Section 7.2, we saw that the components of an ordered pair are the coordinates of a point in a plane. Thus, to graph an equation in two variables, we graph the set of ordered pairs that are solutions to the equation. For example, we can find some solutions to the first-degree equation

by letting x equal 0, -3, -2, and 3. Then,

for x = 0, y=0+2=2 for x = 0, y = -3 + 2 = -1 for x = -2, y = -2 + 2 - 0 for x = 3, y = 3 + 2 = 5

and we obtain the solutions

(0,2), (-3,-1), (-2,0), and (3,5)

which can be displayed in a tabular form as shown below.

problem solving on graph

If we graph the points determined by these ordered pairs and pass a straight line through them, we obtain the graph of all solutions of y = x + 2, as shown in Figure 7.3. That is, every solution of y = x + 2 lies on the line, and every point on the line is a solution of y = x + 2.

problem solving on graph

The graphs of first-degree equations in two variables are always straight lines; therefore, such equations are also referred to as linear equations.

In the above example, the values we used for x were chosen at random; we could have used any values of x to find solutions to the equation. The graphs of any other ordered pairs that are solutions of the equation would also be on the line shown in Figure 7.3. In fact, each linear equation in two variables has an infinite number of solutions whose graph lies on a line. However, we only need to find two solutions because only two points are necessary to determine a straight line. A third point can be obtained as a check.

To graph a first-degree equation:

Graph the equation y = 2x - 6.

Solution We first select any two values of x to find the associated values of y. We will use 1 and 4 for x. If x = 1, y = 2(1) - 6 = -4 if x = 4, y = 2(4) - 6 = 2 Thus, two solutions of the equation are (1, -4) and (4, 2). Next, we graph these ordered pairs and draw a straight line through the points as shown in the figure. We use arrowheads to show that the line extends infinitely far in both directions. Any third ordered pair that satisfies the equation can be used as a check: if x = 5, y = 2(5) -6 = 4 We then note that the graph of (5, 4) also lies on the line To find solutions to an equation, as we have noted it is often easiest to first solve explicitly for y in terms of x.

problem solving on graph

Graph x + 2y = 4.

Solution We first solve for y in terms of x to get

problem solving on graph

We now select any two values of x to find the associated values of y. We will use 2 and 0 for x.

problem solving on graph

Thus, two solutions of the equation are (2, 1) and (0, 2).

Next, we graph these ordered pairs and pass a straight line through the points, as shown in the figure.

Any third ordered pair that satisfies the equation can be used as a check:

problem solving on graph

We then note that the graph of (-2, 3) also lies on the line.

SPECIAL CASES OF LINEAR EQUATIONS

The equation y = 2 can be written as

and can be considered a linear equation in two variables where the coefficient of x is 0. Some solutions of 0x + y = 2 are

(1,2), (-1,2), and (4,2)

In fact, any ordered pair of the form (x, 2) is a solution of (1). Graphing the solutions yields a horizontal line as shown in Figure 7.4.

problem solving on graph

Similarly, an equation such as x = -3 can be written as

x + 0y = -3

and can be considered a linear equation in two variables where the coefficient of y is 0.

Some solutions of x + 0y = -3 are (-3, 5), (-3, 1), and (-3, -2). In fact, any ordered pair of the form (-3, y) is a solution of (2). Graphing the solutions yields a vertical line as shown in Figure 7.5.

problem solving on graph

a. y = 3 b. x=2

Solution a. We may write y = 3 as Ox + y =3. Some solutions are (1, 3), (2,3), and (5, 3).

problem solving on graph

b. We may write x = 2 as x + Oy = 2. Some solutions are (2, 4), (2, 1), and (2, -2).

problem solving on graph

7.4 INTERCEPT METHOD OF GRAPHING

In Section 7.3, we assigned values to x in equations in two variables to find the corresponding values of y. The solutions of an equation in two variables that are generally easiest to find are those in which either the first or second component is 0. For example, if we substitute 0 for x in the equation

3x + 4y = 12

3(0) + 4y = 12 y = 3

Thus, a solution of Equation (1) is (0, 3). We can also find ordered pairs that are solutions of equations in two variables by assigning values to y and determining the corresponding values of x. In particular, if we substitute 0 for y in Equation (1), we get

3x + 4(0) = 12 x = 4

and a second solution of the equation is (4, 0). We can now use the ordered pairs (0, 3) and (4, 0) to graph Equation (1). The graph is shown in Figure 7.6. Notice that the line crosses the x-axis at 4 and the y-axis at 3. For this reason, the number 4 is called the x-intercept of the graph, and the number 3 is called the y-intercept.

problem solving on graph

This method of drawing the graph of a linear equation is called the intercept method of graphing. Note that when we use this method of graphing a linear equation, there is no advantage in first expressing y explicitly in terms of x.

Graph 2x - y = 6 by the intercept method.

Solution We find the x-intercept by substituting 0 for y in the equation to obtain

2x - (0) = 6 2x = 6 x = 3

Now, we find the y-intercept by substituting for x in the equation to get

2(0) - y = 6 -y = 6 y = -6

The ordered pairs (3, 0) and (0, -6) are solutions of 2x - y = 6. Graphing these points and connecting them with a straight line give us the graph of 2x - y = 6. If the graph intersects the axes at or near the origin, the intercept method is not satisfactory. We must then graph an ordered pair that is a solution of the equation and whose graph is not the origin or is not too close to the origin.

problem solving on graph

Graph y = 3x.

Solution We can substitute 0 for x and find y = 3(0) = 0 Similarly, substituting 0 for y, we get 0 = 3.x, x = 0 Thus, 0 is both the x-intercept and the y-intercept.

Since one point is not sufficient to graphy = 3x, we resort to the methods outlined in Section 7.3. Choosing any other value for x,say 2, we get

y = 3(2) = 6

Thus, (0, 0) and (2, 6) are solutions to the equation. The graph of y = 3x is shown at the right.

problem solving on graph

7.5 SLOPE OF A LINE

SLOPE FORMULA

In this section, we will study an important property of a line. We will assign a number to a line, which we call slope, that will give us a measure of the "steepness" or "direction" of the line.

It is often convenient to use a special notation to distinguish between the rectan- gular coordinates of two different points. We can designate one pair of coordinates by (x 1 , y 1 (read "x sub one, y sub one"), associated with a point P 1 , and a second pair of coordinates by (x 2 , y 2 ), associated with a second point P 2 , as shown in Figure 7.7. Note in Figure 7.7 that when going from P 1 to P 2 , the vertical change (or vertical distance) between the two points is y 2 - y 1 and the horizontal change (or horizontal distance) is x 2 - x 1 .

problem solving on graph

The ratio of the vertical change to the horizontal change is called the slope of the line containing the points P 1 and P 2 . This ratio is usually designated by m. Thus,

problem solving on graph

Solution We designate (3, 5) as (x 2 , y 2 ) and (-4, 2) as (x 1 , y 1 ). Substituting into Equation (1) yields

problem solving on graph

Note that we get the same result if we subsitute -4 and 2 for x 2 and y 2 and 3 and 5 for x 1 and y 1

problem solving on graph

Lines with various slopes are shown in Figure 7.8 below. Slopes of the lines that go up to the right are positive (Figure 7.8a) and the slopes of lines that go down to the right are negative (Figure 7.8b). And note (Figure 7.8c) that because all points on a horizontal line have the same y value, y 2 - y 1 equals zero for any two points and the slope of the line is simply

problem solving on graph

Also note (Figure 7.8c) that since all points on a vertical have the same x value, x 2 - x 1 equals zero for any two points. However,

problem solving on graph

is undefined, so that a vertical line does not have a slope.

problem solving on graph

PARALLEL AND PERPENDICULAR LINES

Consider the lines shown in Figure 7.9. Line l 1 has slope m 1 = 3, and line l 2 has slope m 2 = 3. In this case,

problem solving on graph

These lines will never intersect and are called parallel lines. Now consider the lines shown in Figure 7.10. Line l 1 , has slope m 1 = 1/2 and line l 2 has slope m 2 = -2. In this case,

problem solving on graph

These lines meet to form a right angle and are called perpendicular lines.

problem solving on graph

In general, if two lines have slopes and m2: a. The lines are parallel if they have the same slope, that is, if m 1 = m 2 . b. The lines are perpendicular If the product of their slopes is -1, that is, if m 1 * m 2 = -1.

7.6 EQUATIONS OF STRAIGHT LINES

POINT-SLOPE FORM

In Section 7.5, we found the slope of a straight line by using the formula

problem solving on graph

Let us say we know that a line goes through the point (2, 3) and has a slope of 2. If we denote any other point on the line as P(x, y) (See Figure 7.1 la), by the slope formula

problem solving on graph

Thus, Equation (1) is the equation of the line that goes through the point (2, 3) and has a slope of 2.

problem solving on graph

In general let us say we know a line passes through a point P 1 (x 1 , y 1 and has slope m. If we denote any other point on the line as P(x, y) (see Figure 7.11 b), by the slope formula

problem solving on graph

Equation (2) is called the point-slope form for a linear equation. In Equation (2), m, x 1 and y 1 are known and x and y are variables that represent the coordinates of any point on the line. Thus, whenever we know the slope of a line and a point on the line, we can find the equation of the line by using Equation (2).

A line has slope -2 and passes through point (2, 4). Find the equation of the line.

Solution Substitute -2 for m and (2, 4) for (x 1 , y 1 ) in Equation (2)

problem solving on graph

Thus, a line with slope -2 that passes through the point (2, 4) has the equation y = -2x + 8. We could also write the equation in equivalent forms y + 2x = 8, 2x + y = 8, or 2x + y - 8 = 0.

SLOPE-INTERCEPT FORM

Now consider the equation of a line with slope m and y-intercept b as shown in Figure 7.12. Substituting 0 for x 1 and b for y 1 in the point-slope form of a linear equation, we have

y - b = m(x - 0) y - b = mx

problem solving on graph

Equation (3) is called the slope-intercept form for a linear equation. The slope and y-intercept can be obtained directly from an equation in this form.

Example 2 If a line has the equation

problem solving on graph

then the slope of the line must be -2 and the y-intercept must be 8. Similarly, the graph of

y = -3x + 4

has a slope -3 and a y-intercept 4; and the graph of

problem solving on graph

has a slope 1/4 and a y-intercept -2.

If an equation is not written in x = mx + b form and we want to know the slope and/or the y-intercept, we rewrite the equation by solving for y in terms of x.

Find the slope and y-intercept of 2x - 3y = 6.

Solution We first solve for y in terms of x by adding -2x to each member.

2x - 3y - 2x = 6 - 2x - 3y = 6 - 2x

Now dividing each member by -3, we have

problem solving on graph

Comparing this equation with the form y = mx + b, we note that the slope m (the coefficient of x) equals 2/3, and the y-intercept equals -2.

7.7 DIRECT VARIATION

A special case of a first-degree equation in two variables is given by

y = kx (k is a constant)

Such a relationship is called a direct variation. We say that the variable y varies directly as x.

We know that the pressure P in a liquid varies directly as the depth d below the surface of the liquid. We can state this relationship in symbols as

In a direct variation, if we know a set of conditions on the two variables, and if we further know another value for one of the variables, we can find the value of the second variable for this new set of conditions.

In the above example, we can solve for the constant k to obtain

problem solving on graph

Since the ratio P/d is constant for each set of conditions, we can use a proportion to solve problems involving direct variation.

If pressure P varies directly as depth d, and P = 40 when d = 10, find P when d = 15.

Solution Since the ratio P/d is constant, we can substitute values for P and d and obtain the proportion

problem solving on graph

Thus, P = 60 when d = 15.

7.8 INEQUALITIES IN TWO VARIABLES

In Sections 7.3 and 7.4, we graphed equations in two variables. In this section we will graph inequalities in two variables. For example, consider the inequality

y ≤ -x + 6

The solutions are ordered pairs of numbers that "satisfy" the inequality. That is, (a, b) is a solution of the inequality if the inequality is a true statement after we substitute a for x and b for y.

Determine if the given ordered pair is a solution of y = -x + 6.

a. (1, 1) b. (2, 5)

Solution The ordered pair (1, 1) is a solution because, when 1 is substituted for x and 1 is substituted for y, we get

(1) = -(1) + 6, or 1 = 5

which is a true statement. On the other hand, (2, 5) is not a solution because when 2 is substituted for x and 5 is substituted for y, we obtain

(5) = -(2) + 6, or 5 = 4

which is a false statement.

To graph the inequality y = -x + 6, we first graph the equation y = -x + 6 shown in Figure 7.13. Notice that (3, 3), (3, 2), (3, 1), (3, 0), and so on, associated with the points that are on or below the line, are all solutions of the inequality y = -x + 6, whereas (3,4), (3, 5), and (3,6), associated with points above the line are not solutions of the inequality. In fact, all ordered pairs associated with points on or below the line are solutions of y = - x + 6. Thus, every point on or below the line is in the graph. We represent this by shading the region below the line (see Figure 7.14).

problem solving on graph

In general, to graph a first-degree inequality in two variables of the form Ax + By = C or Ax + By = C, we first graph the equation Ax + By = C and then determine which half-plane (a region above or below the line) contains the solutions. We then shade this half-plane. We can always determine which half- plane to shade by selecting a point (not on the line of the equation Ax + By = C) and testing to see if the ordered pair associated with the point is a solution of the given inequality. If so, we shade the half-plane containing the test point; otherwise, we shade the other half-plane. Often, (0, 0) is a convenient test point.

Graph 2x+3y = 6

Solution We first graph the line 2x + 3y = 6 (see graph a). Using the origin as a test point, we determine whether (0, 0) is a solution of 2x + 3y ≥ 6. Since the statement

2(0) + 3(0) = 6

is false, (0, 0) is not a solution and we shade the half-plane that does not contain the origin (see graph b).

problem solving on graph

When the line Ax + By = C passes through the origin, (0, 0) is not a valid test point since it is on the line.

Graph y = 2x.

Solution We begin by graphing the line y = 2x (see graph a). Since the line passes through the origin, we must choose another point not on the line as our test point. We will use (0, 1). Since the statement

is true, (0, 1) is a solution and we shade the half-plane that contains (0, 1) (see graph b).

problem solving on graph

If the inequality symbol is ' , the points on the graph of Ax + By = C are not solutions of the inequality. We then use a dashed line for the graph of Ax + By = C.

CHAPTER SUMMARY

A solution of an equation in two variables is an ordered pair of numbers. In the ordered pair (x, y), x is called the first component and y is called the second component. For an equation in two variables, the variable associated with the first component of a solution is called the independent variable and the variable associated with the second component is called the dependent variable. Function notation f(x) is used to name an algebraic expression in x. When x in the symbol f(x) is replaced by a particular value, the symbol represents the value of the expression for that value of x.

The intersection of the two perpendicular axes in a coordinate systemis called the origin of the system, and each of the four regions into which the plane is divided is called a quadrant. The components of an ordered pair (x, y) associated with a point in the plane are called the coordinates of the point; x is called the abscissa of the point and y is called the ordinate of the point.

The graph of a first-degree equation in two variables is a straight line. That is, every ordered pair that is a solution of the equation has a graph that lies in a line, and every point in the line is associated with an ordered pair that is a solution of the equation.

The graphs of any two solutions of an equation in two variables can be used to obtain the graph of the equation. However, the two solutions of an equation in two variables that are generally easiest to find are those in which either the first or second component is 0. The x-coordinate of the point where a line crosses the x-axis is called the x-intercept of the line, and the y-coordinate of the point where a line crosses the y-axis is called they-intercept of the line. Using the intercepts to graph an equation is called the intercept method of graphing.

The slope of a line containing the points P 1 (x 1 , y 1 ) and P 2 (x 2 , y 2 ) is given by

problem solving on graph

Two lines are parallel if they have the same slope (m 1 = m 2 ).

Two lines are perpendicular if the product of their slopes is - l(m 1 * m 2 = -1).

The point-slope form of a line with slope m and passing through the point (x 1 , y 1 ) is

y - y 1 - m(x - x 1 )

The slope-intercept form of a line with slope m and y-intercept b is

A relationship determined by an equation of the form

y = kx (k a constant)

is called a direct variation.

A solution of an inequality in two variables is an ordered pair of numbers that, when substituted into the inequality, makes the inequality a true statement. The graph of a linear inequality in two variables is a half-plane. The symbols introduced in this chapter appear on the inside front covers.

Math Topics

More solvers.

  • Add Fractions
  • Simplify Fractions

Graphing Calculator

What do you want to calculate.

  • Solve for Variable
  • Practice Mode
  • Step-By-Step

Example (Click to try)

How to graph your problem.

  • Type in your equation like y=2x+1 (If you have a second equation use a semicolon like y=2x+1 ; y=x+3)
  • Press Calculate it to graph!

Graphing Equations Video Lessons

  • Khan Academy Video: Graphing Lines
  • Khan Academy Video: Graphing a Quadratic Function

Need more problem types? Try MathPapa Algebra Calculator

Clear Graphing Calculator »

Microsoft

Get step-by-step solutions to your math problems

qr code

Try Math Solver

Key Features

Get step-by-step explanations

Graph your math problems

Graph your math problems

Practice, practice, practice

Practice, practice, practice

Get math help in your language

Get math help in your language

The Definitive Guide to Graph Problems

Do you want to learn how to solve graph problems? Are you preparing for a coding interview? Do you want to polish your problem-solving skills? In this article I will try to answer these questions and more, and you will learn the patterns necessary to deal with these problems.

What is a Graph?

A Graph is a data structure consisting of Nodes (or vertices) and Edges . This data structure is often use as a way to represent distances or different connections.

For example the distances between cities, with arbitrary distances.

With a graph you can know things like, the distance from New York to Paris, and from Paris to Tokyo, also, thanks to the graph you know that if you can go from New York to Paris and from Paris to Tokyo, you can go from New York to Tokyo.

  • Nodes: a node (normally the circles in the graph) can have a value, for example a letter or a number, or have not value at all.
  • Edges: the edges (or arrows) are the lines that connect one node with another one. An edge can have a value, this value may represent some sort o distance.

More formally a Graph is composed of a set of Nodes(N) and a set of edges(E).

Graph in the context of coding interviews

During technical interviews you are often asked to solve coding challenges. And you must have a good understanding of graph algorithms if you want to do well in these challenges.

Graph are often a topic present in coding interviews, so here I want to show you how to tackle these problems and the different patterns that you need to know or be aware of.

I recommend reading the topics in this article in order, as we will develop the subject progressively and the understanding of the first exercises are the basis for the following ones.

Problem solutions

All the solutions to the problems presented in this article can be found in this GitHub Repository

How do you traverse a graph?

When traversing a graph there are two main techniques, known as Breadth-First-Search and Depth-First-Search , this is the fundamental block that you will use in most graph problems.

Breadth-First-Search (BFS)

Breadth-First-Search (BFS) is an algorithm for searching a tree data structure for a node that satisfies a given property. It starts at the tree root (or the node that you want) and explores all nodes at the present depth prior to moving on to the nodes at the next depth level.

Extra memory, usually a queue , is needed to keep track of the child nodes that were encountered but not yet explored.

The result of the BFS algorithm will be –> 1, 2, 3, 4, 5, 6.

To implement a BFS algorithm, you have to follow the next steps:

  • Declare a queue and insert the starting node.
  • While the queue is not empty you remove the first node of the queue.
  • Insert all the neighbors of the node into the queue.

All of the algorithms will be presented in python, feel free to implement them in your favorite language

BFS Code implementation

Time and space complexity.

Time Complexity of BFS: O(V+E) where V is vertices (nodes) and E is edges, since you must go through all the nodes and edges of the graph

Space Complexity of BFS: O(V) where V is vertices (nodes), since the queue will have at most V elements

Depth-First-Search (DFS)

Depth-First-Search (DFS) is an algorithm for traversing or searching tree or graph data structures.

The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far as possible along each branch before backtracking.

Extra memory, usually a stack , is needed to keep track of the nodes discovered so far along a specified branch which helps in backtracking of the graph.

The result of the DFS algorithm will be –> 1, 3, 6, 5, 2, 4.

To implement a DFS algorithm, you have to follow the next steps:

For the iterative solution :

  • Declare a stack and insert the starting node.
  • While the stack is not empty you remove the last node of the stack.

For the recursive solution :

  • Create a recursive function that takes in the graph and the starting node.
  • Create your base cases.
  • Traverse all the neighboring nodes and call the recursive function with the index of the neighboring node.

DFS Code implementation, Iterative

Dfs code implementation, recursion.

Time Complexity of DFS: O(V+E) where V is vertices (nodes) and E is edges, since you must go through all the nodes and edges of the graph

Space Complexity of DFS: O(V) where V is vertices (nodes), since the stack will have at most V elements

Adjacency List as my Graph representation

Sometimes we may be given an input that is not what we expect, or that is difficult to work with. One of the easiest ways to work with graphs is with an adjacency list .

Suppose we have an input like the one below.

Where the first element of the array, [“1”, “2”] , reads as, node one connects to node 2, and node 2 connects to node 1. To transform this input into an adjacency list we can create a function like create_graph , to transform the array into an adjacency list that is easier to work with.

And the output is:

In this way we can deal with these problems without having to worry about the shape of the input.

Let’s practice the traversal

Now we need to put into practice what we have learned with an exercise.

We are going to write a function has_path that takes a dictionary or object representing the adjacency list of a graph, and the parameters will be (starting_node, destination) . The function must return a True value whether there is a directed path between the source node and the destination node, otherwise we should return False

This is the input graph

Has path Code implementation

We are going to implement the solution using BFS and DFS (recursively and iteratively).

The process is quite straightforward, we need to implement the same algorithm we implemented above, but searching for the destination node. Feel free to give it a try on your own before jump into the solution 😋.

BFS Iterative Solution

Dfs iterative solution.

As we can see, this is essentially the same code, except with an stack instead of a queue data structure.

DFS Recursive Solution

Here we are going to implement the DFS algorithm using a recursive approach.

Undirected Graph and the Visited Pattern

So far we have seen directed graph , that is, from one node to another node there is only one direction, consider the next example:

In this example you can go from New York to Paris, but not the other way around.

An undirected graph is a graph, where all the edges are bidirectional.

In this example 👆, you can go from New York to Paris, and from Paris to New York.

But what is the Visited Pattern ?

As you can imagine, now we need to find some way to know which nodes we visit and which we don’t, so we can avoid infinite loops.

Generally a solution to this is to use a set , which allows us to have constant lookups, that is access to an element in constant time.

Let’s practice some exercises.

Here we will practice some exercises using BFS and DFS, and we will implement the visited pattern. Again, feel free to try to solve these exercises on your own before jump into the code.

I will explain in the code the new lines that we need to solve the problem and potential gotchas.

Find a path Between node A and B in a undirected Graph

This problem is similar to the Has Path problem presented above, but with the difference that we have an undirected node, so we have to pay attention to the nodes we visit, in order not to fall into an infinite loop.

Our input graph is the following:

The new concepts to keep in mind are the following:

  • We need to create a data structure to keep track of the visited node, typically a set .
  • When we loop through the neighbors of our current node, we need to ask if that node has already been visited.
  • If the node has been visited, we skip the node (this may depend of the problem).
  • After we check that our node has not been visited yet, we mark it as visited.

BFS Solution - Has Path - Undirected Graph

We implement the BFS algorithm as we have seen before, but we add a new element, the visited set, to keep track of our visited nodes.

DFS Iterative Solution - Has Path - Undirected Graph

This solution is similar to the BFS approach, but using an stack instead of a queue.

DFS Recursive Solution - Has Path - Undirected Graph - Variation # 1

We implement a recursive approach to look for the visited nodes, we also add a new parameter to our function, a set, to keep track of the node that we have seen.

DFS Recursive Solution - Has Path - Undirected Graph - Variation # 2

This is a slight variation of the recursive DFS recursive approach. The main difference is that we check if the node has been visited when we loop the neighbors of our current node.

Count Components

In this exercise we will have to count the components that are connected. For instance, that a look at the example below 👇. As you see, there are 3 components. So our objective consists of counts how many components our graph has.

We need to write a function connected_components_counts(graph) that takes in a graph as a parameter, and it must return the number of components that the graph has, or zero if it has none.

This problem has the particularity that we have to iterate through all the nodes of the graph, because if not, we will not know if they are all connected, or if we are missing any of them.

BFS Solution - Count Components

Here we implement our now classic BFS traversal, we iterate through our graph, and asking if the node has been visited or not. We also need a way to count the components, to do so, we create a count variable, to count our components.

We have to take into account the following in order to solve this problem

We count as + 1 component, when our queue is empty, because when we’re traversing on the first node of a component and we add an element to the queue, and when the queue happened to be empty that means that we have visited all the nodes related to the first node of our for loop

On the next element of our for loop, if that element has been visited we skip it, if the next element of our for loop is a node that has not been visited, that means that we found a new component and we need to search for its neighbors and add them to the queue.

DFS Iterative Solution - Count Components

The way to solve the count components problem using a DFS algorithm is similar to the BFS version, except that we use a stack instead of a queue .

DFS Recursive Solution - Count Components

The recursive solution at first glance seems different from what we have been implementing.

The difference is that now we use a for loop, to iterate through all the nodes of the graph and then we call the function traverse_graph to do our classic DFS algorithm. We still need to keep track of the nodes we visit.

Now our recursive function is going to return True or False , if it is True it means that we traversed all the nodes of a component, and we add + 1 to our count variable.

Largest Component

IIn this exercise we have to calculate the size of the largest component, this gives us the idea that we should initialize a variable, to keep track of the largest component so far, and that is exactly what we are going to do.

We need to write a function get_largests_component that takes in a graph as a parameter, and it must return the the size of the largest component.

For example, the graph we are going to take as an example is the one below, we can see that the maximum size of the component is 6, which is the component on the left.

BFS Solution - Largest Component

Dfs iterative solution - largest component.

As always, the difference between DFS and BFS is the use of a stack instead of a queue.

DFS Recursive Solution - Largest Component - Variation #1

Here we will look at two variations using recursion. The first is to pass the parameter size to the recursive function and increment it one by one, and then compare it with the maximum value obtained from all the functions.

DFS Recursive Solution - Largest Component - Variation #2

The difference with this variation with respect to the previous one is that now we have a base case, where if the node is visited we return zero, otherwise, the size is 1 and we add the results of the other recursive functions.

Shortest Path

In this exercise we must find the shortest path in an undirected graph, between two nodes. For example consider the example below, where we can see that there are several paths to get from node 1 to node 6, these paths can be:

  • 1, 2, 4, 5, 6
  • 1, 2, 4, 5, 3, 6

But we must consider the shortest one, we need a notion of length/distance , for our case, we consider that the distance between each node is 1, that is, the distance is the amount of “Edges”, for example the route (1, 2, 4, 5, 6) consists of 4 edges, therefore the distance is 4.

In the example below we can see the correct shortest path, although there may be several.

The difficulty of these exercises is that now we need to keep track, not only the nodes we visited, but also the distance from the previous node to the current one.

For example, we can start from node A, saying that the distance is 0, but when adding an element to the queue or stack, we will have to add not only the neighboring node, but also the current distance, which is zero, plus 1.

Write a function, shortest_path , that receives an undirected graph and two nodes, (source, destination) . The function should return the length of the shortest path between Source and Destination. Consider the length as the number of edges in the path, not the number of nodes. If there is no path between A and B, then return -1.

BFS Iterative Solution - Shortest Path

If you think about it for a moment you may ask yourself, what is the best way to traverse the graph, if you look at a Depth First Search approach, it will try to traverse the graph from the beginning to the end in a single direction, where this may not be the most convenient. On the other hand, BFS, will try to expand by extending one by one the distances to the surroundings of the node, finding the solution faster.

A particularity of these exercises is that we add to the queue or stack, the node and the distance, in our case it is in the form of a tuple, that is to say (node, distance_so_far) , as we are doing BFS, at the moment we find the destination node, it means that we find the shortest distance,

Graph with cycles

Now we are going to look at how to deal with problems of finding cycles in graphs, although the graphs we were looking at previously had cycles, we did not try to determine whether they contained them or not, but rather avoided them, using the visited pattern .

Let’s refresh the concepts a bit

A cycle graph is a graph consisting of a single cycle, or in other words, a certain number of nodes connected in a closed chain.

For example, if we look at the image below, we can see that node 3 has a cycle, since from node 3 we can go to node 3 an infinite number of times, thus forming a closed chain.

The graph below also contains a cycle, as we can go from 1 to 2 and from 2 to 1 many times, but we can also go from node 1, to node 4, from 4 to 5 and from 5 to 2 and back to 1 again.

How to find a cycle?

You might be imagining that finding a cycle is a trivial task, since you can use the visited variable we’ve been using and determine that if the new node is visited it means we’ve found a cycle.

But that solution has a problem, we may be presented with a graph like the following.

In this graph, we have explored nodes 1, 2 and 3, but node 4 has not yet been explored, when we start exploring node 4, we will arrive at node 2, and this node has been visited, but as you can see in the image, this graph does not present a cycle, so our solution would be incorrect.

The solution is to use an additional variable, which we will call it currently_in_stack , to keep track of the nodes we explored from our first node.

Once we have explored a path with a node, we remove it from the stack, while keeping track of the nodes visited in our visited variable.

As a way of illustration, suppose we explore these nodes, the value of our variables would be:

  • Visited: 1, 2, 3
  • Currently_in_stack: 1, 2, 3

Now we need to explore node 4, so what we do is empty the currently_in_stack variable, and the visited variable is left unchanged.

So when we go from node 4 to node 2, we will ask if node 2 is in the variable currently_in_stack , and if it is not, it means that we have not found a cycle yet. To find a cycle, what should have happened is that the node we explore must be in the variable currently_in_stack.

Has a cycle?

This exercise consists of finding out whether the graph has a cycle or not.

Write a function cycle_in_graph that has a graph as a parameter, and returns True if the graph contains a cycle or false if it does not have a cycle.

Feel free to try it out for yourself before jumping into the solution.

Has a cycle solution

In this solution we use a combination of iteration with recursion to find whether the graph has a cycle or not.

Matrix as a graph

You may not always get the nodes and edges of a graph, you may get a grid , in which case it is still possible to think of a problem with a grid as if it were a graph.

For example we can, think of the position of a cell (row, col), as if it were the node, and we can consider that a node can move, up , down , left , right , i.e. it has at most 4 neighbors.

For example consider the grid below, the node would be, with index zero, row 3 and column 2, that is (3, 2), and the neighbors would be the arrows.

The problem with these grids is that when finding our neighbors, we must consider not to go out of the grid.

If our position is (row, col), our neighbors would be:

  • Up: (row - 1, col)
  • Down: (row + 1, col)
  • Right: (row, col + 1)
  • Left: (row, col - 1)

Problems with islands 🏝

Now we are going to look at two typical grid problems, which consist of counting the islands and finding the largest island. I will start by first explaining how to count the islands.

Count the islands

This problem consists of counting how many islands there are in the grid. The water will be represented in blue and the land in yellow, the idea is to consider an island as any set of yellow cells that are next to each other. If we look at the grid below, we will see that there are 4 islands, but how do we solve this problem?

The input parameter of our problem will be a grid of the following style:

You have probably noticed that what we have to do is to iterate this grid to access the cells, and then ask if it is water, we do nothing, and if it is a land, we must mark it as visited.

As we find land, we must also find the neighboring nodes, through BFS or DFS, we must also ask if the neighboring nodes are water or land, and if they are land, we must explore their neighbors and so on.

It is important to mark neighboring nodes as visited, so that in the next iteration of our for loop, we ask if the current cell is water or the land has been visited, if that is the case, we skip them.

The problem statement is as follows:

Write a function, island_count , that takes in a grid containing Ws and Ls. W represents water and L represents land. The function should return the number of island on the grid. An island is a vertically or horizontally connected region of land

BFS Iterative Solution - Count the islands

Here we are going to use a BFS algorithm to solve the problem, the difference with the previous exercises is that we are going to have an additional loop to iterate through the grid, then we will ask if the cell is water or land, if it is water we do nothing, or if we already visited it we do nothing.

Another difference is that we are going to store in the variable visited the position of the cell, as a tuple (row, col) , but feel free to use whatever you want, it could also be an array [row, col] .

We also create an additional function called get_neighbors , to get the neighboring nodes to the current cell, being careful not to get an out of bounds error.

DFS Recursive Solution - Count the islands

The recursive solution has the particularity that it will have more base cases, where it will check not to have an out of bound situation.

Also, the recursive function will take care of adding the neighboring nodes as visited.

Largest Island

This problem is similar to the previous one, with the particularity that we must slightly change our function to keep track of the largest island we have found.

Write a function, largest_island , that takes in a grid containing Ws and Ls. W represents water and L, represents Land. The function should return the size of the largest island. An island is a vertically or horizontally connected region of land.

BFS Iterative Solution - Largest Island

The iterative BFS solution is similar to the previous one, with the main difference being that we count the length of the island in the explore_land function , and then compare it to our max_island variable.

DFS Recursive Solution - Largest Island

The main difference between the solution of counting the islands and getting the largest island by recursion, is that now we have to add up the sizes of the islands we find, and then compare them with our max_size variable.

If you have reached this point, it means that you have learnt the following:

  • How to explore a graph using Breadth-First-Search.
  • How to explore a graph using Depth-First-Search.
  • You learned not to fall into infinite loops by using the visited pattern.
  • You know how to tackle problems with grids as if they were graphs.
  • You know how to apply recursive and iterative solutions.

Congratulations you have learned the basic building blocks to tackle any problem with graphs, I wish you all the best in your future coding interviews 😉.

problem solving on graph

2.1 Understanding Graphs

Supercharge your thinking with the language of algebra.

Seeing Solutions

Plot solutions on the coordinate plane.

Practice Seeing Solutions

Cement your understanding of Seeing Solutions

Revealing Patterns

Graph solutions and look for patterns.

Practice Revealing Patterns

Cement your understanding of Revealing Patterns

Explore the continuity of solutions.

Practice Continuity

Cement your understanding of Continuity

Using Continuity

Practice Using Continuity

Cement your understanding of Using Continuity

Diminishing Returns

Graph and analyze an equation to learn how fast chargers work.

End of Unit 1

Complete all lessons above to reach this milestone.

0 of 9 lessons complete

Find where a graph touches the axes.

Practice Intercepts

Cement your understanding of Intercepts

Up and Down

Reason about graphs by finding increasing and decreasing patterns.

Practice Up and Down

Cement your understanding of Up and Down

Minimums and Maximums

Understand how to identify minimum and maximum values of solutions to an equation.

Practice Minimums and Maximums

Cement your understanding of Minimums and Maximums

Bounded Graphs

See how graphs look when some solutions don't exist.

Practice Bounded Graphs

Cement your understanding of Bounded Graphs

Graphs with Gaps

Practice Graphs with Gaps

Cement your understanding of Graphs with Gaps

Training an AI

Explore the error rate of an AI as it trains with graphs.

End of Unit 2

0 of 11 lessons complete

Rate of Change

Explore what makes a line a line.

Practice Rate of Change

Cement your understanding of Rate of Change

Slope and Parameters

Practice Slope and Parameters

Cement your understanding of Slope and Parameters

The y-Intercept

Investigate lines that don't go through the origin.

Practice The y-Intercept

Cement your understanding of The y-Intercept

Horizontal and Vertical Lines

Learn what it means to be linear.

Practice Horizontal and Vertical Lines

Cement your understanding of Horizontal and Vertical Lines

Rules of Thumb

Investigate approximating familiar relationships with graphs.

End of Unit 3

Multiplying Expressions

Discover parabolas and quadratic equations.

Practice Multiplying Expressions

Cement your understanding of Multiplying Expressions

Quadratic Equations

Explore a parabola's vertex and symmetry.

Practice Quadratic Equations

Cement your understanding of Quadratic Equations

Practice Symmetry

Cement your understanding of Symmetry

Shifting Parabolas

Investigate how to change a parabola's location and width.

Practice Shifting Parabolas

Cement your understanding of Shifting Parabolas

Wide, Narrow, and Upside Down

Practice Wide, Narrow, and Upside Down

Cement your understanding of Wide, Narrow, and Upside Down

Building Quadratics

Combine different ways to change a parabola into a single equation.

Practice Building Quadratics

Cement your understanding of Building Quadratics

Optimizing Revenue

Find the best price to set a coffee using graphs.

End of Unit 4

0 of 13 lessons complete

Population Growth

End of Unit 5

0 of 1 lessons complete

Course description

This course explores the twin pillars of algebraic thinking—equations and graphs. With these two tools, we'll unpack algebra's big ideas and develop a powerful perspective to solve its essential problems. By the end of this course, you'll understand graphs and their relationship to the equations they represent, enabling you to answer questions involving equations even when it's impossible to solve them by hand. Though a familiarity with solving equations is helpful, we'll start with a review of the basics and build on them throughout the course. When you finish, you'll be ready to conquer a wide range of algebraic techniques in Algebra 1.

Topics covered

  • Algebraic Expressions
  • Coordinate Plane
  • Linear Equations
  • Ordered Pairs
  • Simplifying
  • Systems of Equations

Prerequisites and next steps

Though a familiarity with solving equations is helpful, we'll start with a review of the basics and build on them throughout the course.

Solver Title

Practice

Generating PDF...

  • Pre Algebra Order of Operations Factors & Primes Fractions Long Arithmetic Decimals Exponents & Radicals Ratios & Proportions Percent Modulo Number Line Mean, Median & Mode
  • Algebra Equations Inequalities System of Equations System of Inequalities Basic Operations Algebraic Properties Partial Fractions Polynomials Rational Expressions Sequences Power Sums Interval Notation Pi (Product) Notation Induction Logical Sets Word Problems
  • Pre Calculus Equations Inequalities Scientific Calculator Scientific Notation Arithmetics Complex Numbers Polar/Cartesian Simultaneous Equations System of Inequalities Polynomials Rationales Functions Arithmetic & Comp. Coordinate Geometry Plane Geometry Solid Geometry Conic Sections Trigonometry
  • Calculus Derivatives Derivative Applications Limits Integrals Integral Applications Integral Approximation Series ODE Multivariable Calculus Laplace Transform Taylor/Maclaurin Series Fourier Series Fourier Transform
  • Functions Line Equations Functions Arithmetic & Comp. Conic Sections Transformation
  • Linear Algebra Matrices Vectors
  • Trigonometry Identities Proving Identities Trig Equations Trig Inequalities Evaluate Functions Simplify
  • Statistics Mean Geometric Mean Quadratic Mean Average Median Mode Order Minimum Maximum Probability Mid-Range Range Standard Deviation Variance Lower Quartile Upper Quartile Interquartile Range Midhinge Standard Normal Distribution
  • Physics Mechanics
  • Chemistry Chemical Reactions Chemical Properties
  • Finance Simple Interest Compound Interest Present Value Future Value
  • Economics Point of Diminishing Return
  • Conversions Roman Numerals Radical to Exponent Exponent to Radical To Fraction To Decimal To Mixed Number To Improper Fraction Radians to Degrees Degrees to Radians Hexadecimal Scientific Notation Distance Weight Time Volume
  • Pre Algebra
  • Pre Calculus
  • Linear Algebra
  • Trigonometry
  • Conversions

Click to reveal more operations

Most Used Actions

Number line.

  • x^{2}-x-6=0
  • -x+3\gt 2x+1
  • line\:(1,\:2),\:(3,\:1)
  • prove\:\tan^2(x)-\sin^2(x)=\tan^2(x)\sin^2(x)
  • \frac{d}{dx}(\frac{3x+9}{2-x})
  • (\sin^2(\theta))'
  • \lim _{x\to 0}(x\ln (x))
  • \int e^x\cos (x)dx
  • \int_{0}^{\pi}\sin(x)dx
  • \sum_{n=0}^{\infty}\frac{3}{2^n}
  • Is there a step by step calculator for math?
  • Symbolab is the best step by step calculator for a wide range of math problems, from basic arithmetic to advanced calculus and linear algebra. It shows you the solution, graph, detailed steps and explanations for each problem.
  • Is there a step by step calculator for physics?
  • Symbolab is the best step by step calculator for a wide range of physics problems, including mechanics, electricity and magnetism, and thermodynamics. It shows you the steps and explanations for each problem, so you can learn as you go.
  • How to solve math problems step-by-step?
  • To solve math problems step-by-step start by reading the problem carefully and understand what you are being asked to find. Next, identify the relevant information, define the variables, and plan a strategy for solving the problem.
  • My Notebook, the Symbolab way Math notebooks have been around for hundreds of years. You write down problems, solutions and notes to go back...

Please add a message.

Message received. Thanks for the feedback.

  • Data Structures
  • Linked List
  • Binary Tree
  • Binary Search Tree
  • Segment Tree
  • Disjoint Set Union
  • Fenwick Tree
  • Red-Black Tree
  • Advanced Data Structures
  • Two Clique Problem (Check if Graph can be divided in two Cliques)
  • Hopcroft–Karp Algorithm for Maximum Matching | Set 2 (Implementation)
  • 2-Satisfiability (2-SAT) Problem
  • Transitive closure of a graph using Floyd Warshall Algorithm
  • Find maximum number of edge disjoint paths between two vertices
  • A Peterson Graph Problem
  • Shortest path in a graph from a source S to destination D with exactly K edges for multiple Queries
  • Graph Data Structure And Algorithms
  • Check for star graph
  • Hopcroft–Karp Algorithm for Maximum Matching | Set 1 (Introduction)
  • Check if incoming edges in a vertex of directed graph is equal to vertex itself or not
  • Number of sink nodes in a graph
  • Check if there exists a connected graph that satisfies the given conditions
  • Roots of a tree which give minimum height
  • Shortest path with one curved edge in an undirected Graph
  • Largest subset of Graph vertices with edges of 2 or more colors
  • Check whether the structure of given Graph is same as the game of Rock-Paper-Scissor
  • Maximize the number of uncolored vertices appearing along the path from root vertex and the colored vertices
  • Count number of edges in an undirected graph

Top 50 Graph Coding Problems for Interviews

Here is the collection of the Top 50 list of frequently asked interview questions on Graph. Problems in this Article are divided into three Levels so that readers can practice according to the difficulty level step by step.

Top 50 Graph Coding Problems for Interviews

Related Articles:

  • Top 50 Array Coding Problems for Interviews
  • Top 50 String Coding Problems for Interviews
  • Top 50 Tree Coding Problems for Interviews
  • Top 50 Dynamic Programming Coding Problems for Interviews
  • Top 50 Sorting Coding Problems for Interviews
  • Top 50 Searching Coding Problems for Interviews
  • Top 50 Binary Search Tree Coding Problems for Interviews

Some other important Tutorials:

  • DSA Tutorial
  • System Design Tutorial
  • Software Development Roadmap
  • Roadmap to become a Product Manager

Track your progress and attempt this list on GfG Practice.

Please Login to comment...

Similar reads.

  • CBSE Exam Format Changed for Class 11-12: Focus On Concept Application Questions
  • 10 Best Waze Alternatives in 2024 (Free)
  • 10 Best Squarespace Alternatives in 2024 (Free)
  • Top 10 Owler Alternatives & Competitors in 2024
  • 30 OOPs Interview Questions and Answers (2024)

Improve your Coding Skills with Practice

 alt=

What kind of Experience do you want to share?

  • For a new problem, you will need to begin a new live expert session.
  • You can contact support with any questions regarding your current subscription.
  • You will be able to enter math problems once our session is over.
  • I am only able to help with one math problem per session. Which problem would you like to work on?
  • Does that make sense?
  • I am currently working on this problem.
  • Are you still there?
  • It appears we may have a connection issue. I will end the session - please reconnect if you still need assistance.
  • Let me take a look...
  • Can you please send an image of the problem you are seeing in your book or homework?
  • If you click on "Tap to view steps..." you will see the steps are now numbered. Which step # do you have a question on?
  • Please make sure you are in the correct subject. To change subjects, please exit out of this live expert session and select the appropriate subject from the menu located in the upper left corner of the Mathway screen.
  • What are you trying to do with this input?
  • While we cover a very wide range of problems, we are currently unable to assist with this specific problem. I spoke with my team and we will make note of this for future training. Is there a different problem you would like further assistance with?
  • Mathway currently does not support this subject. We are more than happy to answer any math specific question you may have about this problem.
  • Mathway currently does not support Ask an Expert Live in Chemistry. If this is what you were looking for, please contact support.
  • Mathway currently only computes linear regressions.
  • We are here to assist you with your math questions. You will need to get assistance from your school if you are having problems entering the answers into your online assignment.
  • Have a great day!
  • Hope that helps!
  • You're welcome!
  • Per our terms of use, Mathway's live experts will not knowingly provide solutions to students while they are taking a test or quiz.

Please ensure that your password is at least 8 characters and contains each of the following:

  • a special character: @$#!%*?&

IMAGES

  1. solving problems using line graphs

    problem solving on graph

  2. Statistics- Use line graphs to solve problems

    problem solving on graph

  3. Problem Solving with Linear Graphs

    problem solving on graph

  4. What Is Problem-Solving? Steps, Processes, Exercises to do it Right

    problem solving on graph

  5. Problem Solving Strategies

    problem solving on graph

  6. Unit 4 1 6 Problem Solving by Graphing

    problem solving on graph

VIDEO

  1. Solving Inequalities Graphically (using two graphs)

  2. 3-1 Solving Systems Using Tables and Graphs

  3. Graph Question SAT Practice #satmath

  4. Math Tip for the TI 84 calculator How to find the intersections of two lines on the graph

  5. Graph Theory

  6. Graph Theory

COMMENTS

  1. Desmos

    Explore math with our beautiful, free online graphing calculator. Graph functions, plot points, visualize algebraic equations, add sliders, animate graphs, and more.

  2. Graphing Calculator

    Free online graphing calculator - graph functions, conics, and inequalities interactively

  3. Solving equations by graphing: intro (video)

    There are generally multiple ways to solve such problems and the possibilities depend on the particular problem. For the first problem, (3/2)^x = 5, for example, you could find an upper and lower bound for the value of x and then keep shrinking the range of values to get better approximations for x. Alternatively, a more complex solution would ...

  4. Mathway

    Free graphing calculator instantly graphs your math problems. Mathway. Visit Mathway on the web. Start 7-day free trial on the app. Start 7-day free trial on the app. Download free on Amazon. Download free in Windows Store. get Go. ... You'll be able to enter math problems once our session is over.

  5. Art of Problem Solving

    A graph is bipartite if and only if it has no odd cycles, if and only if is 2-colorable. Bipartite graphs have many applications including matching problems. The complete bipartite graph (denoted for integers and ) is a bipartite graph where , , and there is an edge connecting every to every (so that has edges).

  6. Symbolab Math Calculator

    Fractions Radical Equation Factoring Inverse Quadratic Simplify Slope Domain Antiderivatives Polynomial Equation Log Equation Cross Product Partial Derivative Implicit Derivative Tangent Complex Numbers. Symbolab: equation search and math solver - solves algebra, trigonometry and calculus problems step by step.

  7. Functions

    Let's explore how we can graph, analyze, and create different types of functions. ... Solving equations & inequalities. Unit 3. Working with units. Unit 4. Linear equations & graphs. ... Average rate of change word problem: graph (Opens a modal) Average rate of change review (Opens a modal)

  8. Microsoft Math Solver

    Graph your math problems. Instantly graph any equation to visualize your function and understand the relationship between variables. Practice, practice, practice. Search for additional learning materials, such as related worksheets and video tutorials. Get math help in your language.

  9. Linear equations & graphs

    Let's explore different ways to find and visualize slopes and intercepts, and how these concepts can help us solve real-world problems. ... Linear equations word problems: graphs Get 3 of 4 questions to level up! Graphing linear relationships word problems Get 3 of 4 questions to level up!

  10. Graphing Calculator

    Interactive, free online graphing calculator from GeoGebra: graph functions, plot data, drag sliders, and much more!

  11. Graph equations with Step-by-Step Math Problem Solver

    Graph x + 2y = 4. Solution We first solve for y in terms of x to get. We now select any two values of x to find the associated values of y. We will use 2 and 0 for x. Thus, two solutions of the equation are (2, 1) and (0, 2). Next, we graph these ordered pairs and pass a straight line through the points, as shown in the figure.

  12. Graphing Calculator

    How to graph your problem. Graph your problem using the following steps: Type in your equation like y=2x+1. (If you have a second equation use a semicolon like y=2x+1 ; y=x+3) Press Calculate it to graph!

  13. Microsoft Math Solver

    Graph your math problems. Instantly graph any equation to visualize your function and understand the relationship between variables. Practice, practice, practice. Search for additional learning materials, such as related worksheets and video tutorials. Get math help in your language.

  14. The Definitive Guide to Graph Problems

    For the iterative solution: Declare a stack and insert the starting node. While the stack is not empty you remove the last node of the stack. Insert all the neighbors of the node into the queue. For the recursive solution: Create a recursive function that takes in the graph and the starting node.

  15. Practice Understanding Graphs

    Course description. This course explores the twin pillars of algebraic thinking—equations and graphs. With these two tools, we'll unpack algebra's big ideas and develop a powerful perspective to solve its essential problems. By the end of this course, you'll understand graphs and their relationship to the equations they represent, enabling ...

  16. Graphing linear relationships word problems

    Graphing linear relationships word problems. Google Classroom. Amir drove from Jerusalem down to the lowest place on Earth, the Dead Sea, descending at a rate of 12 meters per minute. He was at sea level after 30 minutes of driving. Graph the relationship between Amir's altitude relative to sea level (in meters) and time (in minutes).

  17. Step-by-Step Calculator

    It shows you the solution, graph, detailed steps and explanations for each problem. Is there a step by step calculator for physics? ... To solve math problems step-by-step start by reading the problem carefully and understand what you are being asked to find. Next, identify the relevant information, define the variables, and plan a strategy for ...

  18. Top 50 Graph Coding Problems for Interviews

    Here is the collection of the Top 50 list of frequently asked interview questions on Graph. Problems in this Article are divided into three Levels so that readers can practice according to the difficulty level step by step. ... Problems. Solve. Connected Components in an Undirected Graph: Solve: Find the number of islands: Solve: Detect cycle ...

  19. Linear equations, functions, & graphs

    This topic covers: - Intercepts of linear equations/functions - Slope of linear equations/functions - Slope-intercept, point-slope, & standard forms - Graphing linear equations/functions - Writing linear equations/functions - Interpreting linear equations/functions - Linear equations/functions word problems

  20. Mathway

    Free math problem solver answers your algebra homework questions with step-by-step explanations.

  21. Solving equations graphically: word problems

    Solving equations graphically: word problems. Google Classroom. A piecewise function f can model the height (in meters) of an airplane during a flight. Here is the graph of f , where t is the number of minutes that have passed since takeoff. 20 40 60 80 100 120 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 11000 y t f.