Thursday, January 24, 2013

P VERSUS NP By Farid El Hajj 2012

DESCRIPTION OF P VERSUS NP PROBLEM

Most famous open problem in theoretical computer science. Its solution can deep our understanding of algorithm complexity or maybe it will give us a mathematical tool for solving hard problems in an efficient way. Great work has been spent on providing a solution but no one has ever been able to solve it.

HISTORY

Described in its current form by Cook in 1971 in a paper where he proved the first NP-Complete problem. In 1973 Karp gave another 21 NP-Complete problems. Since then tremendous effort has been deployed to find an algorithm that will reduce any NP problem to P, or on the contrary to prove that these two classes of problems are different.

TECHNICAL IMPACT 

The P versus NP problem has a large impact which makes it a fundamental open problem. Imagine one could derive a polynomial time algorithm for solving an NP-Complete problem, then any NP problem with exponential time could be reduced and solved in a polynomial time in an efficient way. No such algorithm has been found, nor the impossibility to find such a problem has been proved.

LARGER IMPACT
  
If someone could derive such an algorithm the result will have an impact on several domains: theorem proving could be done in an efficient and tractable way. Optimization and resource management will be an easy matter. The impact will be tremendous on many and unthought-of domains such as evolutional biology and economics and much more.
 

If P equals NP then current cryptographic schemes will be broken in a reasonable time and power. The one way functions assumed to be hard could be broken like a piece of toy. But many experts think that P is not equal to NP.

TECHNICAL DESCRIPTION 

The problem belongs to complexity theory. P is the class of problems solved by a deterministic Turing machine in a polynomial time. NP is the class of problems which are solved by a non- deterministic Turing machine in a polynomial time, which means it can be solved by brute force algorithm in an exponential time. Cook in 1971 wrote a paper where he gave the description of the P versus NP problem and he proved that the Boolean satisfiability problem belongs to the NP-Complete class, also he proved that any NP problem could be reduced to an NP- Complete one using a Turing machine in a polynomial time.

Tuesday, February 14, 2012

How to delete all items from a table in Castle ActiveRecord

Suppose you have a table named Customer for example then to delete all rows from a table in Castle ActiveRecord call the following method defined in the table class:

public static void DeleteAll()
 {
     DeleteAll(typeof(Customer));
 }

Note that you can't call DeleteAll(typeof(Customer)) directly from any class because it's defined as private.

SquishIt with UTF-8 Support


In order to let SquishIt Support UTF-8 javascript files use the following:
<%= Bundle.JavaScript()
        .Add("~/Scripts/test.js")
        .WithAttribute("charset", "utf-8")
        .Render("~/Scripts/combined.js")
    %>


Incenter Barycentric Property

In a triangle ABC with edge AB denoted by c, BC denoted by a and CA denoted by b, incenter I of the triangle have the following barycentric property: a IA +b IB + c IC = 0.

Note: when a = b = c then the triangle is equilateral and the incenter and centroid of the triangle are coincident.


Saturday, November 12, 2011

Démontrer que I=]0,1[ n’est pas compact en utilisons l’axiome C1

Solution d' un problème d'analyse du cours d'analyse 1 niveau université:
Démontrer que I=]0,1[  n’est pas compact en utilisons l’axiome C1
Axiome C1:    De tout recouvrement ouvert de I  il existe un sous-recouvrement fini.



Pdf link

f application croissante et la limite à gauche en x0

Solution d' un problème d'analyse du cours d'analyse 1 niveau université:

Soit f une application de R=>R ,avec f croissante et la limite à gauche en x0, f(x0 -0) existe.

Démontrer que f(x0 -0) = sup(x<x0) {f(x)}


Pdf link

Programming

Programming is the collection of processes and implementations that a programmer is conducted to for providing a solution to a physical or abstract problem arising in different domains: business, science, engineering, etc… The programmer is the person who analyses and formulates his or other needs in an abstract manner and then provides the concrete implementation and solution to the problem.

In programming problems needs to be formulated in a clear way: no uncertainty is acceptable in the program execution. The program needs to be well abstracted and implemented using well known paradigms and conventions. The programmer is not born with all required skills and professionalism. His skills increase with time and experience, in a way that his productivity increases. A good programmer needs to write clean code, and he must always have in mind that someone will come after him and reviews or maintains the program’s code.


The problem that the programmer resolves must be well understood and then it will be dissected into several parts and modules which cooperate and communicate to achieve a certain goal. This dissection must have in mind data and process flexibility in both program’s input and output.