P AND NP PROBLEMS

Опубликовано: 24 Октябрь 2024
на канале: PRINCE OF PROGRAMMING
111
like

P AND NP PROBLEMS - THEORY OF COMPUTATION

#theoryofcomputation #P #NP #NPHARD #NPCOMPLETE #KRUSKALS #TRAVELLINGSALESMAN #finiteautomata #regularexpressions #pcp #postcorrespondenceproblem #regularlanguages #toc #computerscience

Welcome to my channel Prince of Programming👨🎓
@princeofprogramming

   / @princeofprogramming  

This tutorial will give you a full introduction into the P AND NP PROBLEMS    • P AND NP PROBLEMS  

Give this video a thumps up👍

Share & subscribe for more videos😏

Show your support to recover the channel❤

Click the bell icon to get notified for new videos🔔

Feel free to drop your doubts in the comment section📗

TOPIC - P AND NP PROBLEM    • P AND NP PROBLEMS  

What are P problems?

 The problems that can be solved in a polynomial time by deterministic turing machine.

 Example: a) Kruskals Algorithm b) Decidable Problem

What are NP problems?

 The problems that can be solved in a non-deterministic polynomial time by non deterministic
turing machine.

 Example: a)Travelling Salesman Problem b)Undecidable Problem

 The NP problems can be classified into NP-complete and NP-hard.

 NP-complete: A problem is NP-complete if it belongs to class NP and every problem in NP can also be solved in polynomial time.

 NP-hard: A problem is said to be NP-hard if an algorithm for solving it can be translated into a problem which is NP problem.

 Thus NP-hard is an algorithm for a problem which is at least as hard as any NP problem.
Example - Sum of subset problem, travelling salesman problem.

 All NP-complete problems are NP-hard but all NP-hard problems cannot be NP-complete.

Example for P-class Problem: Kruskal’s Algorithm

 In Kruskal’s algorithm, the minimum weight is obtained.

 Circuit should not be formed.

 Each time, the edge of minimum weight has to be selected from the graph.

 It is not necessary to have edges of minimum weights to be adjacent.

Example for NP-class Problem: Travelling Salesman Problem

 This problem can be stated as “Given set of cities and cost to travel between each pair of cities, determine whether there is a path that visits every city once and returns to the first city.”

 Such that the cost travelled is less.


#computerscience #finiteautomata #regularexpressions #regularlanguages #theory_of_computation #theoryofcomputation #toc #computerprogramming #computerscience #regularexpressions #regularsets #regularlanguages #kleeneclosure #closure #FINITEAUTOMATA #finiteautomata #NFA #NONDETERMINISTIC #DFA #toc #automata #automation #equivalence #automatatheory #finiteautomata #theory_of_computation #cse #CS3452 #CS8501 #youtubevideos #sub #youtubevideo #like #instagram #programming #coding #programmer #python #developer #technology #code #coder #computerscience #tech #software #codinglife #linux #softwaredeveloper #programmingmemes #programmers #programminglife #hacking #machinelearning #php #computer #softwareengineer #bhfyppubg