Should these conditions be satisfied?

  • MHB
  • Thread starter evinda
  • Start date
  • Tags
    Conditions
In summary, the conversation discusses solving a recurrence relation and proving the solution by induction. The solution found is $T(n)=O(n)$, but there is confusion about which formula to use. The conversation also mentions the possibility of treating $T(n)$ as a continuous function and finding a solution using that approach. Ultimately, the question arises of whether the solution is truly $T(n)=O(n)$.
  • #1
evinda
Gold Member
MHB
3,836
0
Hello! (Wave)

I have to solve the recurrence relation

$$T(n)=\left\{\begin{matrix}
3T\left (\frac{n}{4} \right)+n & , n>1\\
1 &, n=1
\end{matrix}\right.$$

and prove by induction that the solution I found is right.

I found that the solution of the recurrence relation is $T(n)=O(n)$.

I started proving it like that:

  • $n=1: T(1)=1 \leq c \cdot 1 \checkmark \text{ for } c \geq 1$
  • We suppose that for any $m$, $2 \leq m <n , n>2$: $T(m) \leq c \cdot m$.
  • We want to show that the claim stands for $n$.

But, then I noticed that we do not have a formula for $T \left ( \frac{n}{4} \right)$ when $n<4$ and also when $n \neq 4^k$.

So, do we have to suppose that $n \geq 4$ and $n=4^k$ ? (Thinking)

If so, at which point of the proof, do I have to claim it? (Thinking)
 
Physics news on Phys.org
  • #2
Could we prove that $T(n)=O(n)$ like that?

The recursive relation $T(n)=3T \left (\frac{n}{4} \right )+n$ is only defined for $n=4^k,k \geq 0$ , so:

$$T(n)=3T \left ( \frac{n}{4} \right )+n \Rightarrow T(4^k)=3T(4^{k−1})+4^k$$
  • $ \displaystyle{ k=0 \Rightarrow n=1: T(1)=1 \leq c \cdot 1 \text{ if } c \geq 1 }$
    $$$$
  • We suppose that $T(4^{k−1}) \leq c \cdot 4^{k−1}$
    $$$$
  • $\displaystyle{ T(4^k)=3T(4^{k−1})+4^k \leq c \cdot 4^k \text{ if } c \geq 4 }$

So, $T(n)=O(n)$.

(Thinking) :confused: (Thinking)
 
  • #3
Or do I have to prove by induction that $T(n)=4n-3 n^{ \log_4 3 }$ and not that $T(n)=O(n)$ ? (Thinking)
 
  • #4
For the truth something in the setting of this problem is not clear, in the first place the fact that we speak of the recurrence relation, which suggests that T (n) is a discrete function. In this case, however, if n is not multiple of 4, the function is not defined. For this reason, we assume that T (x) is an ordinary function of the continuous variable x in which case we should speak of functional relation ...

$\displaystyle T(x) = 3\ T(\frac{x}{4}) + x\ (1)$

Solving (1) is relatively comfortable if we suppose that T(x) is written in the form $\displaystyle T(x) = \sum_{n=0}^{\infty} a_{n}\ x^{n}$ and imposing the (1) You easily find that $a_{1}=4$ and $a_{n}=0$ for $n \ne 1$, so that the solution is $T(x) = 4\ x$. This This result, easily verifiable, however contrasts with the constraint T(1)=1 so that I must confess I did not understand the problem well ...

Kind regards

$\chi$ $\sigma$

P.S. It is useful to note, however, that for the solution found is $\displaystyle T(x) = \mathcal {O} (x)$...
 
Last edited:
  • #5
One possibility to put everything in place would be to write ...

$\displaystyle T(n) = 3\ T(\lfloor \frac{n}{4} \rfloor) + n,\ T(1)=1\ (1)$

Using the result I have obtained in the previous post it is easy to demonstrate that $\displaystyle T(n) \le 4\ n$ so that is $\displaystyle T(n) = \mathcal {O} (n)$... but is it really true? ...

Kind regards

$\chi$ $\sigma$
 

FAQ: Should these conditions be satisfied?

What are the necessary conditions that need to be satisfied for a successful experiment?

The necessary conditions for a successful experiment vary depending on the specific research question and methodology. However, some common conditions that should be satisfied include a clear hypothesis, well-defined variables, appropriate control groups, and reliable data collection methods.

Why is it important to ensure that all conditions are satisfied in a scientific experiment?

Ensuring that all conditions are satisfied in a scientific experiment is crucial because it helps to eliminate any potential confounding variables that could affect the results. This ensures that the observed outcomes are due to the manipulated variables and not any other factors.

What happens if the necessary conditions are not satisfied in a scientific experiment?

If the necessary conditions are not satisfied in a scientific experiment, the results may not be valid or reliable. This could lead to misleading conclusions and hinder the progress of scientific research. It is important to carefully plan and execute experiments to ensure all conditions are met.

Are there any exceptions to the rule that all conditions must be satisfied in a scientific experiment?

There may be some cases where not all conditions can be satisfied in a scientific experiment. For example, in some fields such as astronomy or paleontology, experiments cannot be controlled in the same way as in a laboratory setting. In these cases, scientists must carefully consider and account for potential factors that could affect the results.

How can scientists ensure that all conditions are satisfied in their experiments?

To ensure that all conditions are satisfied in a scientific experiment, scientists must carefully plan and design their experiments, taking into account all potential variables and sources of error. They must also follow rigorous procedures and document their methods to ensure reproducibility and accuracy of results.

Back
Top