Computer Science, asked by anoynomous84, 13 days ago

There are N cycles in a row. These cycles are known for their class and smooth
riding.
Now in order to showcast it to the public some number of guards so that each
these cycles will be inspected. Each guard will be deployed under one of the
cycles.
For convenience, we will assign numbers from 1 through N to the cycles. A guar
deployed under the i-th cycle (1 between (i-x ,i+x) both inclusive.
Find the minimum number of guards that we need to deploy to find the optimal
result.

Answers

Answered by UniqueOne07
0

In graph theory, a cycle in a graph is a non-empty trail in which the only repeated vertices are the first and last vertices. ... A graph without cycles is called an acyclic graph. A directed graph without directed cycles is called a directed acyclic graph. A connected graph without cycles is called a tree.

Answered by barmansuraj489
0

Concept:

The term "optimal solution" refers to a workable solution that minimizes (or maximizes, if that is the desired outcome) the objective function.

Given:

Here the statement given to us is there are N cycles in a row. These cycles are known for their class and smooth riding.

Now in order to showcase it to the public some number of guards so that each these cycles will be inspected. Each guard will be deployed under one of the cycles. For convenience, we will assign numbers from 1 through N to the cycles. A guard deployed under the i-th cycle (1 between (i-x ,i+x) both inclusive.

Find:

We have to find the minimum number of guards that we need to deploy to find the optimal result.

Solution:

According to the problem,

In graph theory, a cycle in a graph is a non-empty trail in which the only repeated vertices are the first and last vertices. A graph without cycles is called an acyclic graph. A directed graph without directed cycles is called a directed acyclic graph. A connected graph without cycles is called a tree.

Hence we have written the number of guards that we need to deploy to find the optimal result and this is our final answer also.

SPJ3

Similar questions