Class 16: Easy and Hard problems

Computing for Molecular Biology 2

Andrés Aravena, PhD

30 April 2021

Life is hard, sometimes

We can say that there are two kinds of problems

  • Easy problems
  • Hard problems

Easy problems

… can be solved quickly

For example

5 × 7?

Hard problems

Take longer time to solve

For example

78 / 6

Solutions are easily to verify

If we think that

78 / 6 = 13

We can easily verify this solution doing

13 × 6 = 78

Forward and Backward

It is useful to say that

  • Easy problems move Forward
  • Hard problems move Backward

For example

  • Multiplication moves forward,
  • Division moves backward,
  • Verification is forward again

Easy problem

Find the value of

162

Hard problem

Find the value of

\(\sqrt{324}\)

When you find a solution, it is easy to verify

Easy problem

Multiply two prime numbers

4391 * 6113
[1] 26842183

Hard problem

Find the two prime numbers that are factors of this

[1] 26164559

All Internet security is based on this idea

Breaking Internet security is hard

It is based on factorization of large numbersinto prime numbers

1 Hard problem = Many Easy problems

As you can realize, if you know how to solve the forward problem, you can solve the backward problem by brute force

You try several starting points, apply the forward method and see if you find the backward end point

For example, to solve 78/6 you can try

(1:15) * 6
 [1]  6 12 18 24 30 36 42 48 54 60 66 72 78 84 90

Is there a shortcut?

Is there a way that a hard problem becomes a easy problem?

In some cases, yes

In general, probably no

Nobody knows for sure

So one day Internet security may finish

If you want to know more, google “P versus NP problem”

Easy and Hard problems in Deterministic Systems

We saw this last class and in the Midterm Exam

  • Easy problem: Simulate for some rates and initial conditions
  • Hard problem: Find the rates or initial conditions that match a given result

For example

  • find reaction rates in a chemical reaction
  • find initial DNA concentration in Real-Time qPCR
  • find primer’s efficiency in PCR. That is, melting temperature, and binding energy

Easy and Hard Probability problems

Like in deterministic systems, we have two cases:

  • Easy problem: if we know the probabilities we can simulate several experiments
  • Hard problem: if we know the experiment results, find what are the probabilities