CINXE.COM

P (complexity) - Wikipedia

<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>P (complexity) - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy", "wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"64b0e051-2cce-4fb8-90fe-4a70e91f49ee","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"P_(complexity)","wgTitle":"P (complexity)","wgCurRevisionId":1255594714,"wgRevisionId":1255594714,"wgArticleId":658550,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Articles with short description","Short description is different from Wikidata","Complexity classes"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"P_(complexity)","wgRelevantArticleId":658550,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgRedirectedFrom":"PTIME","wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams": {"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":20000,"wgInternalRedirectTargetUrl":"/wiki/P_(complexity)","wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q846354","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false, "wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.math.styles":"ready","ext.cite.styles":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","jquery.makeCollapsible.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["mediawiki.action.view.redirect","ext.cite.ux-enhancements","mediawiki.page.media","site","mediawiki.page.ready","jquery.makeCollapsible","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.ReferenceTooltips","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups", "ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.quicksurveys.init","ext.growthExperiments.SuggestedEditSession","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=ext.cite.styles%7Cext.math.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cjquery.makeCollapsible.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&amp;only=styles&amp;skin=vector-2022"> <script async="" src="/w/load.php?lang=en&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=site.styles&amp;only=styles&amp;skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="P (complexity) - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/P_(complexity)"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=P_(complexity)&amp;action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/P_(complexity)"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&amp;feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-P_complexity rootpage-P_complexity skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia"><span>Contents</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Current_events" title="Articles related to current events"><span>Current events</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Visit a randomly selected article [x]" accesskey="x"><span>Random article</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:About" title="Learn about Wikipedia and how it works"><span>About Wikipedia</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia"><span>Contact us</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Contribute </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia"><span>Help</span></a></li><li id="n-introduction" class="mw-list-item"><a href="/wiki/Help:Introduction" title="Learn how to edit Wikipedia"><span>Learn to edit</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Community_portal" title="The hub for editors"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes to Wikipedia [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_upload_wizard" title="Add images or other media for use on Wikipedia"><span>Upload file</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Main_Page" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="The Free Encyclopedia" src="/static/images/mobile/copyright/wikipedia-tagline-en.svg" width="117" height="13" style="width: 7.3125em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page&#039;s font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_en.wikipedia.org&amp;uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&amp;returnto=P+%28complexity%29" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&amp;returnto=P+%28complexity%29" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Log in and more options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_en.wikipedia.org&amp;uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&amp;returnto=P+%28complexity%29" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&amp;returnto=P+%28complexity%29" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">(Top)</div> </a> </li> <li id="toc-Definition" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Definition"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Definition</span> </div> </a> <ul id="toc-Definition-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Notable_problems_in_P" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Notable_problems_in_P"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Notable problems in P</span> </div> </a> <ul id="toc-Notable_problems_in_P-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Relationships_to_other_classes" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Relationships_to_other_classes"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Relationships to other classes</span> </div> </a> <ul id="toc-Relationships_to_other_classes-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Properties" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Properties"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Properties</span> </div> </a> <ul id="toc-Properties-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Pure_existence_proofs_of_polynomial-time_algorithms" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Pure_existence_proofs_of_polynomial-time_algorithms"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Pure existence proofs of polynomial-time algorithms</span> </div> </a> <ul id="toc-Pure_existence_proofs_of_polynomial-time_algorithms-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Alternative_characterizations" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Alternative_characterizations"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>Alternative characterizations</span> </div> </a> <ul id="toc-Alternative_characterizations-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-History" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#History"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>History</span> </div> </a> <ul id="toc-History-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Notes" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Notes"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>Notes</span> </div> </a> <ul id="toc-Notes-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-References" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#References"> <div class="vector-toc-text"> <span class="vector-toc-numb">9</span> <span>References</span> </div> </a> <ul id="toc-References-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-External_links" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#External_links"> <div class="vector-toc-text"> <span class="vector-toc-numb">10</span> <span>External links</span> </div> </a> <ul id="toc-External_links-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">P (complexity)</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Go to an article in another language. Available in 27 languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-27" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">27 languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D9%83%D8%AB%D9%8A%D8%B1_%D8%AD%D8%AF%D9%88%D8%AF_(%D8%AA%D8%B9%D9%82%D9%8A%D8%AF)" title="كثير حدود (تعقيد) – Arabic" lang="ar" hreflang="ar" data-title="كثير حدود (تعقيد)" data-language-autonym="العربية" data-language-local-name="Arabic" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/P_(complexitat)" title="P (complexitat) – Catalan" lang="ca" hreflang="ca" data-title="P (complexitat)" data-language-autonym="Català" data-language-local-name="Catalan" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/P_(t%C5%99%C3%ADda_slo%C5%BEitosti)" title="P (třída složitosti) – Czech" lang="cs" hreflang="cs" data-title="P (třída složitosti)" data-language-autonym="Čeština" data-language-local-name="Czech" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/P_(Komplexit%C3%A4tsklasse)" title="P (Komplexitätsklasse) – German" lang="de" hreflang="de" data-title="P (Komplexitätsklasse)" data-language-autonym="Deutsch" data-language-local-name="German" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/P_(clase_de_complejidad)" title="P (clase de complejidad) – Spanish" lang="es" hreflang="es" data-title="P (clase de complejidad)" data-language-autonym="Español" data-language-local-name="Spanish" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-eo mw-list-item"><a href="https://eo.wikipedia.org/wiki/P_(komplikeco)" title="P (komplikeco) – Esperanto" lang="eo" hreflang="eo" data-title="P (komplikeco)" data-language-autonym="Esperanto" data-language-local-name="Esperanto" class="interlanguage-link-target"><span>Esperanto</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/P_(%D9%BE%DB%8C%DA%86%DB%8C%D8%AF%DA%AF%DB%8C)" title="P (پیچیدگی) – Persian" lang="fa" hreflang="fa" data-title="P (پیچیدگی)" data-language-autonym="فارسی" data-language-local-name="Persian" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/P_(complexit%C3%A9)" title="P (complexité) – French" lang="fr" hreflang="fr" data-title="P (complexité)" data-language-autonym="Français" data-language-local-name="French" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/P_(%EB%B3%B5%EC%9E%A1%EB%8F%84)" title="P (복잡도) – Korean" lang="ko" hreflang="ko" data-title="P (복잡도)" data-language-autonym="한국어" data-language-local-name="Korean" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/P_(complessit%C3%A0)" title="P (complessità) – Italian" lang="it" hreflang="it" data-title="P (complessità)" data-language-autonym="Italiano" data-language-local-name="Italian" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/P_(%D7%9E%D7%97%D7%9C%D7%A7%D7%AA_%D7%A1%D7%99%D7%91%D7%95%D7%9B%D7%99%D7%95%D7%AA)" title="P (מחלקת סיבוכיות) – Hebrew" lang="he" hreflang="he" data-title="P (מחלקת סיבוכיות)" data-language-autonym="עברית" data-language-local-name="Hebrew" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://nl.wikipedia.org/wiki/P_(complexiteitsklasse)" title="P (complexiteitsklasse) – Dutch" lang="nl" hreflang="nl" data-title="P (complexiteitsklasse)" data-language-autonym="Nederlands" data-language-local-name="Dutch" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/P_(%E8%A8%88%E7%AE%97%E8%A4%87%E9%9B%91%E6%80%A7%E7%90%86%E8%AB%96)" title="P (計算複雑性理論) – Japanese" lang="ja" hreflang="ja" data-title="P (計算複雑性理論)" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-no mw-list-item"><a href="https://no.wikipedia.org/wiki/P_(kompleksitet)" title="P (kompleksitet) – Norwegian Bokmål" lang="nb" hreflang="nb" data-title="P (kompleksitet)" data-language-autonym="Norsk bokmål" data-language-local-name="Norwegian Bokmål" class="interlanguage-link-target"><span>Norsk bokmål</span></a></li><li class="interlanguage-link interwiki-nn mw-list-item"><a href="https://nn.wikipedia.org/wiki/P_i_kompleksitetsteori" title="P i kompleksitetsteori – Norwegian Nynorsk" lang="nn" hreflang="nn" data-title="P i kompleksitetsteori" data-language-autonym="Norsk nynorsk" data-language-local-name="Norwegian Nynorsk" class="interlanguage-link-target"><span>Norsk nynorsk</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/Problem_P" title="Problem P – Polish" lang="pl" hreflang="pl" data-title="Problem P" data-language-autonym="Polski" data-language-local-name="Polish" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/P_(complexidade)" title="P (complexidade) – Portuguese" lang="pt" hreflang="pt" data-title="P (complexidade)" data-language-autonym="Português" data-language-local-name="Portuguese" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ro mw-list-item"><a href="https://ro.wikipedia.org/wiki/P_(teoria_complexit%C4%83%C8%9Bii)" title="P (teoria complexității) – Romanian" lang="ro" hreflang="ro" data-title="P (teoria complexității)" data-language-autonym="Română" data-language-local-name="Romanian" class="interlanguage-link-target"><span>Română</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%9A%D0%BB%D0%B0%D1%81%D1%81_P" title="Класс P – Russian" lang="ru" hreflang="ru" data-title="Класс P" data-language-autonym="Русский" data-language-local-name="Russian" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://sr.wikipedia.org/wiki/P_(%D1%81%D0%BB%D0%BE%D0%B6%D0%B5%D0%BD%D0%BE%D1%81%D1%82)" title="P (сложеност) – Serbian" lang="sr" hreflang="sr" data-title="P (сложеност)" data-language-autonym="Српски / srpski" data-language-local-name="Serbian" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://fi.wikipedia.org/wiki/P_(vaativuusluokka)" title="P (vaativuusluokka) – Finnish" lang="fi" hreflang="fi" data-title="P (vaativuusluokka)" data-language-autonym="Suomi" data-language-local-name="Finnish" class="interlanguage-link-target"><span>Suomi</span></a></li><li class="interlanguage-link interwiki-th mw-list-item"><a href="https://th.wikipedia.org/wiki/%E0%B8%9E%E0%B8%B5_(%E0%B8%84%E0%B8%A7%E0%B8%B2%E0%B8%A1%E0%B8%8B%E0%B8%B1%E0%B8%9A%E0%B8%8B%E0%B9%89%E0%B8%AD%E0%B8%99)" title="พี (ความซับซ้อน) – Thai" lang="th" hreflang="th" data-title="พี (ความซับซ้อน)" data-language-autonym="ไทย" data-language-local-name="Thai" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/P_(karma%C5%9F%C4%B1kl%C4%B1k)" title="P (karmaşıklık) – Turkish" lang="tr" hreflang="tr" data-title="P (karmaşıklık)" data-language-autonym="Türkçe" data-language-local-name="Turkish" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/%D0%9A%D0%BB%D0%B0%D1%81_%D1%81%D0%BA%D0%BB%D0%B0%D0%B4%D0%BD%D0%BE%D1%81%D1%82%D1%96_P" title="Клас складності P – Ukrainian" lang="uk" hreflang="uk" data-title="Клас складності P" data-language-autonym="Українська" data-language-local-name="Ukrainian" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/P_(%C4%91%E1%BB%99_ph%E1%BB%A9c_t%E1%BA%A1p)" title="P (độ phức tạp) – Vietnamese" lang="vi" hreflang="vi" data-title="P (độ phức tạp)" data-language-autonym="Tiếng Việt" data-language-local-name="Vietnamese" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://zh-yue.wikipedia.org/wiki/P_(%E9%81%8B%E7%AE%97%E8%A4%87%E9%9B%9C%E5%BA%A6)" title="P (運算複雜度) – Cantonese" lang="yue" hreflang="yue" data-title="P (運算複雜度)" data-language-autonym="粵語" data-language-local-name="Cantonese" class="interlanguage-link-target"><span>粵語</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/P_(%E8%A4%87%E9%9B%9C%E5%BA%A6)" title="P (複雜度) – Chinese" lang="zh" hreflang="zh" data-title="P (複雜度)" data-language-autonym="中文" data-language-local-name="Chinese" class="interlanguage-link-target"><span>中文</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q846354#sitelinks-wikipedia" title="Edit interlanguage links" class="wbc-editpage">Edit links</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/P_(complexity)" title="View the content page [c]" accesskey="c"><span>Article</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:P_(complexity)" rel="discussion" title="Discuss improvements to the content page [t]" accesskey="t"><span>Talk</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/P_(complexity)"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=P_(complexity)&amp;action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=P_(complexity)&amp;action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/P_(complexity)"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=P_(complexity)&amp;action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=P_(complexity)&amp;action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/P_(complexity)" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/P_(complexity)" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=P_(complexity)&amp;oldid=1255594714" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=P_(complexity)&amp;action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&amp;page=P_%28complexity%29&amp;id=1255594714&amp;wpFormIdentifier=titleform" title="Information on how to cite this page"><span>Cite this page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FP_%28complexity%29"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FP_%28complexity%29"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&amp;page=P_%28complexity%29&amp;action=show-download-screen" title="Download this page as a PDF file"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=P_(complexity)&amp;printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q846354" title="Structured data on this page hosted by Wikidata [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">From Wikipedia, the free encyclopedia</div> </div> <div id="contentSub"><div id="mw-content-subtitle"><span class="mw-redirectedfrom">(Redirected from <a href="/w/index.php?title=PTIME&amp;redirect=no" class="mw-redirect" title="PTIME">PTIME</a>)</span></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">Class of problems solvable in polynomial time</div> <p>In <a href="/wiki/Computational_complexity_theory" title="Computational complexity theory">computational complexity theory</a>, <b>P</b>, also known as <b>PTIME</b> or <b><a href="/wiki/DTIME" title="DTIME">DTIME</a></b>(<i>n</i><sup>O(1)</sup>), is a fundamental <a href="/wiki/Complexity_class" title="Complexity class">complexity class</a>. It contains all <a href="/wiki/Decision_problem" title="Decision problem">decision problems</a> that can be solved by a <a href="/wiki/Deterministic_Turing_machine" class="mw-redirect" title="Deterministic Turing machine">deterministic Turing machine</a> using a <a href="/wiki/Polynomial" title="Polynomial">polynomial</a> amount of <a href="/wiki/Computation_time" class="mw-redirect" title="Computation time">computation time</a>, or <a href="/wiki/Polynomial_time" class="mw-redirect" title="Polynomial time">polynomial time</a>. </p><p><a href="/wiki/Cobham%27s_thesis" title="Cobham&#39;s thesis">Cobham's thesis</a> holds that P is the class of computational problems that are "efficiently solvable" or "<a href="/wiki/Tractable_problem" class="mw-redirect" title="Tractable problem">tractable</a>". This is inexact: in practice, some problems not known to be in P have practical solutions, and some that are in P do not, but this is a useful <a href="/wiki/Rule_of_thumb" title="Rule of thumb">rule of thumb</a>. </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Definition">Definition</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=P_(complexity)&amp;action=edit&amp;section=1" title="Edit section: Definition"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A <a href="/wiki/Formal_language" title="Formal language">language</a> <i>L</i> is in P if and only if there exists a deterministic Turing machine <i>M</i>, such that </p> <ul><li><i>M</i> runs for polynomial time on all inputs</li> <li>For all <i>x</i> in <i>L</i>, <i>M</i> outputs 1</li> <li>For all <i>x</i> not in <i>L</i>, <i>M</i> outputs 0</li></ul> <p>P can also be viewed as a uniform family of <a href="/wiki/Boolean_circuit" title="Boolean circuit">Boolean circuits</a>. A language <i>L</i> is in P if and only if there exists a <a href="/wiki/Circuit_complexity#Polynomial-time_uniform" title="Circuit complexity">polynomial-time uniform</a> family of Boolean circuits <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \{C_{n}:n\in \mathbb {N} \}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mo fence="false" stretchy="false">{</mo> <msub> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> <mo>:</mo> <mi>n</mi> <mo>&#x2208;<!-- ∈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">N</mi> </mrow> <mo fence="false" stretchy="false">}</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \{C_{n}:n\in \mathbb {N} \}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/58cae53cd06109e13488c083715309059a09ad83" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:13.056ex; height:2.843ex;" alt="{\displaystyle \{C_{n}:n\in \mathbb {N} \}}"></span>, such that </p> <ul><li>For all <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n\in \mathbb {N} }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>n</mi> <mo>&#x2208;<!-- ∈ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">N</mi> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle n\in \mathbb {N} }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d059936e77a2d707e9ee0a1d9575a1d693ce5d0b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.913ex; height:2.176ex;" alt="{\displaystyle n\in \mathbb {N} }"></span>, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle C_{n}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>n</mi> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{n}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/0301812adb392070d834ca2df4ed97f1cf132f33" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.88ex; height:2.509ex;" alt="{\displaystyle C_{n}}"></span> takes <i>n</i> bits as input and outputs 1 bit</li> <li>For all <i>x</i> in <i>L</i>, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle C_{|x|}(x)=1}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">|</mo> </mrow> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">|</mo> </mrow> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>1</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{|x|}(x)=1}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/7e2a670a60ad51d6bd1eaf6d5f508696c5e5799b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:11.149ex; height:3.176ex;" alt="{\displaystyle C_{|x|}(x)=1}"></span></li> <li>For all <i>x</i> not in <i>L</i>, <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle C_{|x|}(x)=0}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">|</mo> </mrow> <mi>x</mi> <mrow class="MJX-TeXAtom-ORD"> <mo stretchy="false">|</mo> </mrow> </mrow> </msub> <mo stretchy="false">(</mo> <mi>x</mi> <mo stretchy="false">)</mo> <mo>=</mo> <mn>0</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle C_{|x|}(x)=0}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/3aa5f7dbac1489186d3a45c6981a26f8ae07a73a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:11.149ex; height:3.176ex;" alt="{\displaystyle C_{|x|}(x)=0}"></span></li></ul> <p>The circuit definition can be weakened to use only a <a href="/wiki/Circuit_complexity#Logspace_uniform" title="Circuit complexity">logspace uniform</a> family without changing the complexity class. </p> <div class="mw-heading mw-heading2"><h2 id="Notable_problems_in_P">Notable problems in P</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=P_(complexity)&amp;action=edit&amp;section=2" title="Edit section: Notable problems in P"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>P is known to contain many natural problems, including the decision versions of <a href="/wiki/Linear_programming" title="Linear programming">linear programming</a>, and finding a <a href="/wiki/Maximum_matching" class="mw-redirect" title="Maximum matching">maximum matching</a>. In 2002, it was shown that the problem of determining if a number is <a href="/wiki/Prime_number" title="Prime number">prime</a> is in P.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">&#91;</span>1<span class="cite-bracket">&#93;</span></a></sup> The related class of <a href="/wiki/Function_problem" title="Function problem">function problems</a> is <a href="/wiki/FP_(complexity)" title="FP (complexity)">FP</a>. </p><p>Several natural problems are complete for P, including <a href="/wiki/St-connectivity" title="St-connectivity"><i>st</i>-connectivity</a> (or <a href="/wiki/Reachability" title="Reachability">reachability</a>) on alternating graphs.<sup id="cite_ref-Immerman_Reachability_2-0" class="reference"><a href="#cite_note-Immerman_Reachability-2"><span class="cite-bracket">&#91;</span>2<span class="cite-bracket">&#93;</span></a></sup> The article on <a href="/wiki/P-complete" title="P-complete">P-complete problems</a> lists further relevant problems in P. </p> <div class="mw-heading mw-heading2"><h2 id="Relationships_to_other_classes">Relationships to other classes</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=P_(complexity)&amp;action=edit&amp;section=3" title="Edit section: Relationships to other classes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-halign-right" typeof="mw:File/Thumb"><a href="/wiki/File:Complexity_subsets_pspace.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Complexity_subsets_pspace.svg/300px-Complexity_subsets_pspace.svg.png" decoding="async" width="300" height="273" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Complexity_subsets_pspace.svg/450px-Complexity_subsets_pspace.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Complexity_subsets_pspace.svg/600px-Complexity_subsets_pspace.svg.png 2x" data-file-width="485" data-file-height="441" /></a><figcaption>A representation of the relation among complexity classes</figcaption></figure> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Complexity-classes-polynomial.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/a/ad/Complexity-classes-polynomial.svg/220px-Complexity-classes-polynomial.svg.png" decoding="async" width="220" height="272" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/a/ad/Complexity-classes-polynomial.svg/330px-Complexity-classes-polynomial.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/a/ad/Complexity-classes-polynomial.svg/440px-Complexity-classes-polynomial.svg.png 2x" data-file-width="512" data-file-height="634" /></a><figcaption>Inclusions of complexity classes including <a class="mw-selflink selflink">P</a>, <a href="/wiki/NP_(complexity)" title="NP (complexity)">NP</a>, <a href="/wiki/Co-NP" title="Co-NP">co-NP</a>, <a href="/wiki/BPP_(complexity)" title="BPP (complexity)">BPP</a>, <a href="/wiki/P/poly" title="P/poly">P/poly</a>, <a href="/wiki/PH_(complexity)" title="PH (complexity)">PH</a>, and <a href="/wiki/PSPACE" title="PSPACE">PSPACE</a></figcaption></figure> <p>A generalization of P is <a href="/wiki/NP_(complexity)" title="NP (complexity)">NP</a>, which is the class of <a href="/wiki/Decision_problem" title="Decision problem">decision problems</a> decidable by a <a href="/wiki/Non-deterministic_Turing_machine" class="mw-redirect" title="Non-deterministic Turing machine">non-deterministic Turing machine</a> that runs in <a href="/wiki/Polynomial_time" class="mw-redirect" title="Polynomial time">polynomial time</a>. Equivalently, it is the class of decision problems where each "yes" instance has a polynomial size certificate, and certificates can be checked by a polynomial time deterministic Turing machine. The class of problems for which this is true for the "no" instances is called <a href="/wiki/Co-NP" title="Co-NP">co-NP</a>. P is trivially a subset of NP and of co-NP; most experts believe it is a proper subset,<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">&#91;</span>3<span class="cite-bracket">&#93;</span></a></sup> although this belief (the <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathsf {P}}\subsetneq {\mathsf {NP}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="sans-serif">P</mi> </mrow> </mrow> <mo>&#x228A;<!-- ⊊ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="sans-serif">N</mi> <mi mathvariant="sans-serif">P</mi> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\mathsf {P}}\subsetneq {\mathsf {NP}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b87ae0b125a947e708dedc21424d40b062829e0d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:7.715ex; height:2.676ex;" alt="{\displaystyle {\mathsf {P}}\subsetneq {\mathsf {NP}}}"></span> hypothesis) <a href="/wiki/P_versus_NP_problem" title="P versus NP problem">remains unproven</a>. Another open problem is whether NP&#160;=&#160;co-NP; since P = co-P,<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">&#91;</span>4<span class="cite-bracket">&#93;</span></a></sup> a negative answer would imply <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathsf {P}}\subsetneq {\mathsf {NP}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="sans-serif">P</mi> </mrow> </mrow> <mo>&#x228A;<!-- ⊊ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="sans-serif">N</mi> <mi mathvariant="sans-serif">P</mi> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\mathsf {P}}\subsetneq {\mathsf {NP}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b87ae0b125a947e708dedc21424d40b062829e0d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:7.715ex; height:2.676ex;" alt="{\displaystyle {\mathsf {P}}\subsetneq {\mathsf {NP}}}"></span>. </p><p>P is also known to be at least as large as <a href="/wiki/L_(complexity)" title="L (complexity)">L</a>, the class of problems decidable in a <a href="/wiki/Logarithm" title="Logarithm">logarithmic</a> amount of <a href="/wiki/Memory_space_(computational_resource)" class="mw-redirect" title="Memory space (computational resource)">memory space</a>. A decider using <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle O(\log n)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>O</mi> <mo stretchy="false">(</mo> <mi>log</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle O(\log n)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/aae0f22048ba6b7c05dbae17b056bfa16e21807d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:8.336ex; height:2.843ex;" alt="{\displaystyle O(\log n)}"></span> space cannot use more than <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 2^{O(\log n)}=n^{O(1)}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mi>O</mi> <mo stretchy="false">(</mo> <mi>log</mi> <mo>&#x2061;<!-- ⁡ --></mo> <mi>n</mi> <mo stretchy="false">)</mo> </mrow> </msup> <mo>=</mo> <msup> <mi>n</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>O</mi> <mo stretchy="false">(</mo> <mn>1</mn> <mo stretchy="false">)</mo> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle 2^{O(\log n)}=n^{O(1)}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/8f3ddeaa79fa0f871e36d1b302003b5981059484" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:15.483ex; height:2.843ex;" alt="{\displaystyle 2^{O(\log n)}=n^{O(1)}}"></span> time, because this is the total number of possible configurations; thus, L is a subset of P. Another important problem is whether L = P. We do know that P = AL, the set of problems solvable in logarithmic memory by <a href="/wiki/Alternating_Turing_machine" title="Alternating Turing machine">alternating Turing machines</a>. P is also known to be no larger than <a href="/wiki/PSPACE" title="PSPACE">PSPACE</a>, the class of problems decidable in polynomial space. Again, whether P = PSPACE is an open problem. To summarize: </p> <dl><dd><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\mathsf {L}}\subseteq {\mathsf {AL}}={\mathsf {P}}\subseteq {\mathsf {NP}}\subseteq {\mathsf {PSPACE}}\subseteq {\mathsf {EXPTIME}}.}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="sans-serif">L</mi> </mrow> </mrow> <mo>&#x2286;<!-- ⊆ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="sans-serif">A</mi> <mi mathvariant="sans-serif">L</mi> </mrow> </mrow> <mo>=</mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="sans-serif">P</mi> </mrow> </mrow> <mo>&#x2286;<!-- ⊆ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="sans-serif">N</mi> <mi mathvariant="sans-serif">P</mi> </mrow> </mrow> <mo>&#x2286;<!-- ⊆ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="sans-serif">P</mi> <mi mathvariant="sans-serif">S</mi> <mi mathvariant="sans-serif">P</mi> <mi mathvariant="sans-serif">A</mi> <mi mathvariant="sans-serif">C</mi> <mi mathvariant="sans-serif">E</mi> </mrow> </mrow> <mo>&#x2286;<!-- ⊆ --></mo> <mrow class="MJX-TeXAtom-ORD"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="sans-serif">E</mi> <mi mathvariant="sans-serif">X</mi> <mi mathvariant="sans-serif">P</mi> <mi mathvariant="sans-serif">T</mi> <mi mathvariant="sans-serif">I</mi> <mi mathvariant="sans-serif">M</mi> <mi mathvariant="sans-serif">E</mi> </mrow> </mrow> <mo>.</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\mathsf {L}}\subseteq {\mathsf {AL}}={\mathsf {P}}\subseteq {\mathsf {NP}}\subseteq {\mathsf {PSPACE}}\subseteq {\mathsf {EXPTIME}}.}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6686cce054f1a66664322a8ff1c9e099400ce152" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:43.586ex; height:2.343ex;" alt="{\displaystyle {\mathsf {L}}\subseteq {\mathsf {AL}}={\mathsf {P}}\subseteq {\mathsf {NP}}\subseteq {\mathsf {PSPACE}}\subseteq {\mathsf {EXPTIME}}.}"></span></dd></dl> <p>Here, <a href="/wiki/EXPTIME" title="EXPTIME">EXPTIME</a> is the class of problems solvable in exponential time. Of all the classes shown above, only two strict containments are known: </p> <ul><li>P is strictly contained in EXPTIME. Consequently, all EXPTIME-hard problems lie outside P, and at least one of the containments to the right of P above is strict (in fact, it is widely believed that all three are strict).</li> <li>L is strictly contained in PSPACE.</li></ul> <p>The most difficult problems in P are <a href="/wiki/P-complete" title="P-complete">P-complete</a> problems. </p><p>Another generalization of P is <a href="/wiki/P/poly" title="P/poly">P/poly</a>, or Nonuniform Polynomial-Time. If a problem is in P/poly, then it can be solved in deterministic polynomial time provided that an <a href="/wiki/Advice_(complexity)" title="Advice (complexity)">advice string</a> is given that depends only on the length of the input. Unlike for NP, however, the polynomial-time machine doesn't need to detect fraudulent advice strings; it is not a verifier. P/poly is a large class containing nearly all practical problems, including all of <a href="/wiki/Bounded-error_probabilistic_polynomial" class="mw-redirect" title="Bounded-error probabilistic polynomial">BPP</a>. If it contains NP, then the <a href="/wiki/Polynomial_hierarchy" title="Polynomial hierarchy">polynomial hierarchy</a> collapses to the second level. On the other hand, it also contains some impractical problems, including some <a href="/wiki/Undecidable_problem" title="Undecidable problem">undecidable problems</a> such as the unary version of any undecidable problem. </p><p>In 1999, <a href="/wiki/Jin-Yi_Cai" title="Jin-Yi Cai">Jin-Yi Cai</a> and D. Sivakumar, building on work by <a href="/w/index.php?title=Mitsunori_Ogihara&amp;action=edit&amp;redlink=1" class="new" title="Mitsunori Ogihara (page does not exist)">Mitsunori Ogihara</a>, showed that if there exists a <a href="/wiki/Sparse_language" title="Sparse language">sparse language</a> that is P-complete, then L = P.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">&#91;</span>5<span class="cite-bracket">&#93;</span></a></sup> </p> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Randomised_Complexity_Classes_2.svg" class="mw-file-description"><img alt="Diagram of randomised complexity classes" src="//upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Randomised_Complexity_Classes_2.svg/280px-Randomised_Complexity_Classes_2.svg.png" decoding="async" width="280" height="280" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Randomised_Complexity_Classes_2.svg/420px-Randomised_Complexity_Classes_2.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Randomised_Complexity_Classes_2.svg/560px-Randomised_Complexity_Classes_2.svg.png 2x" data-file-width="640" data-file-height="640" /></a><figcaption>P in relation to probabilistic complexity classes (<a href="/wiki/ZPP_(complexity)" title="ZPP (complexity)">ZPP</a>, <a href="/wiki/RP_(complexity)" title="RP (complexity)">RP</a>, co-RP, <a href="/wiki/BPP_(complexity)" title="BPP (complexity)">BPP</a>, <a href="/wiki/BQP" title="BQP">BQP</a>, <a href="/wiki/PP_(complexity)" title="PP (complexity)">PP</a>), all within <a href="/wiki/PSPACE" title="PSPACE">PSPACE</a>. It is unknown if any of these containments are strict.</figcaption></figure> <p>P is contained in <a href="/wiki/BQP" title="BQP">BQP</a>; it is unknown whether this containment is strict. </p> <div class="mw-heading mw-heading2"><h2 id="Properties">Properties</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=P_(complexity)&amp;action=edit&amp;section=4" title="Edit section: Properties"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Polynomial-time algorithms are closed under composition. Intuitively, this says that if one writes a function that is polynomial-time assuming that function calls are constant-time, and if those called functions themselves require polynomial time, then the entire algorithm takes polynomial time. One consequence of this is that P is <a href="/wiki/Low_(complexity)" title="Low (complexity)">low</a> for itself. This is also one of the main reasons that P is considered to be a machine-independent class; any machine "feature", such as <a href="/wiki/Random_access" title="Random access">random access</a>, that can be simulated in polynomial time can simply be composed with the main polynomial-time algorithm to reduce it to a polynomial-time algorithm on a more basic machine. </p><p>Languages in P are also closed under reversal, <a href="/wiki/Intersection_(set_theory)" title="Intersection (set theory)">intersection</a>, <a href="/wiki/Union_(set_theory)" title="Union (set theory)">union</a>, <a href="/wiki/Concatenation" title="Concatenation">concatenation</a>, <a href="/wiki/Kleene_closure" class="mw-redirect" title="Kleene closure">Kleene closure</a>, inverse <a href="/wiki/Homomorphism" title="Homomorphism">homomorphism</a>, and <a href="/wiki/Complement_(complexity)" title="Complement (complexity)">complementation</a>.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">&#91;</span>6<span class="cite-bracket">&#93;</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="Pure_existence_proofs_of_polynomial-time_algorithms">Pure existence proofs of polynomial-time algorithms</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=P_(complexity)&amp;action=edit&amp;section=5" title="Edit section: Pure existence proofs of polynomial-time algorithms"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Some problems are known to be solvable in polynomial time, but no concrete algorithm is known for solving them. For example, the <a href="/wiki/Robertson%E2%80%93Seymour_theorem" title="Robertson–Seymour theorem">Robertson–Seymour theorem</a> guarantees that there is a finite list of <a href="/wiki/Forbidden_minor" class="mw-redirect" title="Forbidden minor">forbidden minors</a> that characterizes (for example) the set of graphs that can be embedded on a torus; moreover, Robertson and Seymour showed that there is an O(<i>n</i><sup>3</sup>) algorithm for determining whether a graph has a given graph as a minor. This yields a <a href="/wiki/Nonconstructive_proof" class="mw-redirect" title="Nonconstructive proof">nonconstructive proof</a> that there is a polynomial-time algorithm for determining if a given graph can be embedded on a torus, despite the fact that no concrete algorithm is known for this problem. </p> <div class="mw-heading mw-heading2"><h2 id="Alternative_characterizations">Alternative characterizations</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=P_(complexity)&amp;action=edit&amp;section=6" title="Edit section: Alternative characterizations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In <a href="/wiki/Descriptive_complexity" class="mw-redirect" title="Descriptive complexity">descriptive complexity</a>, P can be described as the problems expressible in <a href="/wiki/FO(LFP)" class="mw-redirect" title="FO(LFP)">FO(LFP)</a>, the <a href="/wiki/First-order_logic" title="First-order logic">first-order logic</a> with a <a href="/wiki/Least_fixed_point" title="Least fixed point">least fixed point</a> operator added to it, on ordered structures. In Immerman's 1999 textbook on descriptive complexity,<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">&#91;</span>7<span class="cite-bracket">&#93;</span></a></sup> Immerman ascribes this result to Vardi<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">&#91;</span>8<span class="cite-bracket">&#93;</span></a></sup> and to Immerman.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">&#91;</span>9<span class="cite-bracket">&#93;</span></a></sup> </p><p>It was published in 2001 that PTIME corresponds to (positive) <a href="/wiki/Range_concatenation_grammars" class="mw-redirect" title="Range concatenation grammars">range concatenation grammars</a>.<sup id="cite_ref-Kallmeyer2010_10-0" class="reference"><a href="#cite_note-Kallmeyer2010-10"><span class="cite-bracket">&#91;</span>10<span class="cite-bracket">&#93;</span></a></sup> </p><p>P can also be defined as an algorithmic complexity class for problems that are not decision problems<sup id="cite_ref-Wegener2005_11-0" class="reference"><a href="#cite_note-Wegener2005-11"><span class="cite-bracket">&#91;</span>11<span class="cite-bracket">&#93;</span></a></sup> (even though, for example, finding the solution to a <a href="/wiki/2-satisfiability" title="2-satisfiability">2-satisfiability</a> instance in polynomial time automatically gives a polynomial algorithm for the corresponding decision problem). In that case P is not a subset of NP, but P∩DEC is, where DEC is the class of decision problems. </p> <div class="mw-heading mw-heading2"><h2 id="History">History</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=P_(complexity)&amp;action=edit&amp;section=7" title="Edit section: History"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Dexter_Kozen" title="Dexter Kozen">Kozen</a><sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">&#91;</span>12<span class="cite-bracket">&#93;</span></a></sup> states that <a href="/wiki/Alan_Cobham_(mathematician)" title="Alan Cobham (mathematician)">Cobham</a> and <a href="/wiki/Jack_Edmonds" title="Jack Edmonds">Edmonds</a> are "generally credited with the invention of the notion of polynomial time," though <a href="/wiki/Michael_O._Rabin" title="Michael O. Rabin">Rabin</a> also invented the notion independently and around the same time (Rabin's paper<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">&#91;</span>13<span class="cite-bracket">&#93;</span></a></sup> was in a 1967 proceedings of a 1966 conference, while Cobham's<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">&#91;</span>14<span class="cite-bracket">&#93;</span></a></sup> was in a 1965 proceedings of a 1964 conference and Edmonds's<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">&#91;</span>15<span class="cite-bracket">&#93;</span></a></sup> was published in a journal in 1965, though Rabin makes no mention of either and was apparently unaware of them). Cobham invented the class as a robust way of characterizing efficient algorithms, leading to <a href="/wiki/Cobham%27s_thesis" title="Cobham&#39;s thesis">Cobham's thesis</a>. However, <a href="/wiki/Henry_Cabourn_Pocklington" title="Henry Cabourn Pocklington">H. C. Pocklington</a>, in a 1910 paper,<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">&#91;</span>16<span class="cite-bracket">&#93;</span></a></sup><sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">&#91;</span>17<span class="cite-bracket">&#93;</span></a></sup> analyzed two algorithms for solving quadratic congruences, and observed that one took time "proportional to a power of the logarithm of the modulus" and contrasted this with one that took time proportional "to the modulus itself or its square root", thus explicitly drawing a distinction between an algorithm that ran in polynomial time versus one that ran in (moderately) exponential time. </p> <div class="mw-heading mw-heading2"><h2 id="Notes">Notes</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=P_(complexity)&amp;action=edit&amp;section=8" title="Edit section: Notes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1239543626">.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist"> <div class="mw-references-wrap mw-references-columns"><ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text">Manindra Agrawal, Neeraj Kayal, Nitin Saxena, "<a rel="nofollow" class="external text" href="http://www.cse.iitk.ac.in/users/manindra/algebra/primality_v6.pdf">PRIMES is in P</a>", <i>Annals of Mathematics</i> 160 (2004), no. 2, pp. 781–793.</span> </li> <li id="cite_note-Immerman_Reachability-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-Immerman_Reachability_2-0">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}</style><cite id="CITEREFImmerman1999" class="citation book cs1"><a href="/wiki/Neil_Immerman" title="Neil Immerman">Immerman, Neil</a> (1999). <a href="/wiki/Descriptive_Complexity" title="Descriptive Complexity"><i>Descriptive Complexity</i></a>. New York: Springer-Verlag. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-387-98600-5" title="Special:BookSources/978-0-387-98600-5"><bdi>978-0-387-98600-5</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Descriptive+Complexity&amp;rft.place=New+York&amp;rft.pub=Springer-Verlag&amp;rft.date=1999&amp;rft.isbn=978-0-387-98600-5&amp;rft.aulast=Immerman&amp;rft.aufirst=Neil&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span></span> </li> <li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFJohnsonbaughSchaefer2004" class="citation book cs1"><a href="/wiki/Richard_Johnsonbaugh" title="Richard Johnsonbaugh">Johnsonbaugh, Richard F.</a>; Schaefer, Marcus (2004). <i>Algorithms</i>. Pearson Education. p.&#160;458. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-02-360692-4" title="Special:BookSources/0-02-360692-4"><bdi>0-02-360692-4</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Algorithms&amp;rft.pages=458&amp;rft.pub=Pearson+Education&amp;rft.date=2004&amp;rft.isbn=0-02-360692-4&amp;rft.aulast=Johnsonbaugh&amp;rft.aufirst=Richard+F.&amp;rft.au=Schaefer%2C+Marcus&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span></span> </li> <li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://stackoverflow.com/questions/40405347/why-is-co-p-p">"complexity theory - Why is co-P = P"</a>. <i>Stack Overflow</i>. <a rel="nofollow" class="external text" href="https://archive.today/20201014205301/https://stackoverflow.com/questions/40405347/why-is-co-p-p/40425607">Archived</a> from the original on 14 October 2020<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-10-14</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=Stack+Overflow&amp;rft.atitle=complexity+theory+-+Why+is+co-P+%3D+P&amp;rft_id=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F40405347%2Fwhy-is-co-p-p&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span></span> </li> <li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFCaiSivakumar1999" class="citation journal cs1"><a href="/wiki/Jin-Yi_Cai" title="Jin-Yi Cai">Cai, Jin-Yi</a>; Sivakumar, D. (April 1999). <a rel="nofollow" class="external text" href="https://doi.org/10.1006%2Fjcss.1998.1615">"Sparse Hard Sets for P: Resolution of a Conjecture of Hartmanis"</a>. <i><a href="/wiki/Journal_of_Computer_and_System_Sciences" title="Journal of Computer and System Sciences">Journal of Computer and System Sciences</a></i>. <b>58</b> (2): 280–296. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1006%2Fjcss.1998.1615">10.1006/jcss.1998.1615</a></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Journal+of+Computer+and+System+Sciences&amp;rft.atitle=Sparse+Hard+Sets+for+P%3A+Resolution+of+a+Conjecture+of+Hartmanis&amp;rft.volume=58&amp;rft.issue=2&amp;rft.pages=280-296&amp;rft.date=1999-04&amp;rft_id=info%3Adoi%2F10.1006%2Fjcss.1998.1615&amp;rft.aulast=Cai&amp;rft.aufirst=Jin-Yi&amp;rft.au=Sivakumar%2C+D.&amp;rft_id=https%3A%2F%2Fdoi.org%2F10.1006%252Fjcss.1998.1615&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span></span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFHopcroftRajeev_MotwaniJeffrey_D._Ullman2001" class="citation book cs1">Hopcroft, John E.; Rajeev Motwani; Jeffrey D. Ullman (2001). <i>Introduction to automata theory, languages, and computation</i> (2.&#160;ed.). Boston: Addison-Wesley. pp.&#160;425–426. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0201441246" title="Special:BookSources/978-0201441246"><bdi>978-0201441246</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Introduction+to+automata+theory%2C+languages%2C+and+computation&amp;rft.place=Boston&amp;rft.pages=425-426&amp;rft.edition=2.&amp;rft.pub=Addison-Wesley&amp;rft.date=2001&amp;rft.isbn=978-0201441246&amp;rft.aulast=Hopcroft&amp;rft.aufirst=John+E.&amp;rft.au=Rajeev+Motwani&amp;rft.au=Jeffrey+D.+Ullman&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span></span> </li> <li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFImmerman1999" class="citation book cs1"><a href="/wiki/Neil_Immerman" title="Neil Immerman">Immerman, Neil</a> (1999). <a href="/wiki/Descriptive_Complexity" title="Descriptive Complexity"><i>Descriptive Complexity</i></a>. New York: Springer-Verlag. p.&#160;66. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-387-98600-5" title="Special:BookSources/978-0-387-98600-5"><bdi>978-0-387-98600-5</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Descriptive+Complexity&amp;rft.place=New+York&amp;rft.pages=66&amp;rft.pub=Springer-Verlag&amp;rft.date=1999&amp;rft.isbn=978-0-387-98600-5&amp;rft.aulast=Immerman&amp;rft.aufirst=Neil&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span></span> </li> <li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFVardi1982" class="citation conference cs1">Vardi, Moshe Y. (1982). "The Complexity of Relational Query Languages". <i>STOC '82: Proceedings of the fourteenth annual ACM symposium on Theory of computing</i>. pp.&#160;137–146. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F800070.802186">10.1145/800070.802186</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=conference&amp;rft.atitle=The+Complexity+of+Relational+Query+Languages&amp;rft.btitle=STOC+%2782%3A+Proceedings+of+the+fourteenth+annual+ACM+symposium+on+Theory+of+computing&amp;rft.pages=137-146&amp;rft.date=1982&amp;rft_id=info%3Adoi%2F10.1145%2F800070.802186&amp;rft.aulast=Vardi&amp;rft.aufirst=Moshe+Y.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span></span> </li> <li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFImmerman1982" class="citation conference cs1">Immerman, Neil (1982). "Relational Queries Computable in Polynomial Time". <i>STOC '82: Proceedings of the fourteenth annual ACM symposium on Theory of computing</i>. pp.&#160;147–152. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F800070.802187">10.1145/800070.802187</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=conference&amp;rft.atitle=Relational+Queries+Computable+in+Polynomial+Time&amp;rft.btitle=STOC+%2782%3A+Proceedings+of+the+fourteenth+annual+ACM+symposium+on+Theory+of+computing&amp;rft.pages=147-152&amp;rft.date=1982&amp;rft_id=info%3Adoi%2F10.1145%2F800070.802187&amp;rft.aulast=Immerman&amp;rft.aufirst=Neil&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span> Revised version in <i>Information and Control</i>, 68 (1986), 86–104.</span> </li> <li id="cite_note-Kallmeyer2010-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-Kallmeyer2010_10-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFLaura_Kallmeyer2010" class="citation book cs1">Laura Kallmeyer (2010). <i>Parsing Beyond Context-Free Grammars</i>. Springer Science &amp; Business Media. pp.&#160;5 and 37. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-3-642-14846-0" title="Special:BookSources/978-3-642-14846-0"><bdi>978-3-642-14846-0</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Parsing+Beyond+Context-Free+Grammars&amp;rft.pages=5+and+37&amp;rft.pub=Springer+Science+%26+Business+Media&amp;rft.date=2010&amp;rft.isbn=978-3-642-14846-0&amp;rft.au=Laura+Kallmeyer&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span> citing <a rel="nofollow" class="external free" href="http://mjn.host.cs.st-andrews.ac.uk/publications/2001d.pdf">http://mjn.host.cs.st-andrews.ac.uk/publications/2001d.pdf</a> for the proof</span> </li> <li id="cite_note-Wegener2005-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-Wegener2005_11-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFWegener2005" class="citation book cs1"><a href="/wiki/Ingo_Wegener" title="Ingo Wegener">Wegener, Ingo</a> (2005). <i>Complexity Theory</i>. Springer-Verlag. p.&#160;35. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1007%2F3-540-27477-4">10.1007/3-540-27477-4</a>. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-3-540-21045-0" title="Special:BookSources/978-3-540-21045-0"><bdi>978-3-540-21045-0</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Complexity+Theory&amp;rft.pages=35&amp;rft.pub=Springer-Verlag&amp;rft.date=2005&amp;rft_id=info%3Adoi%2F10.1007%2F3-540-27477-4&amp;rft.isbn=978-3-540-21045-0&amp;rft.aulast=Wegener&amp;rft.aufirst=Ingo&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span></span> </li> <li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFKozen2006" class="citation book cs1">Kozen, Dexter C. (2006). <i>Theory of Computation</i>. Springer. p.&#160;4. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-1-84628-297-3" title="Special:BookSources/978-1-84628-297-3"><bdi>978-1-84628-297-3</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Theory+of+Computation&amp;rft.pages=4&amp;rft.pub=Springer&amp;rft.date=2006&amp;rft.isbn=978-1-84628-297-3&amp;rft.aulast=Kozen&amp;rft.aufirst=Dexter+C.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span></span> </li> <li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFRabin1967" class="citation conference cs1"><a href="/wiki/Michael_O._Rabin" title="Michael O. Rabin">Rabin, Michael O.</a> (1967). "Mathematical theory of automata". <i>Mathematical Aspects of Computer Science. Proc. Sympos. Appl. Math., Vol. XIX</i>. Amer. Math. Soc. pp.&#160;153–175.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=conference&amp;rft.atitle=Mathematical+theory+of+automata&amp;rft.btitle=Mathematical+Aspects+of+Computer+Science.+Proc.+Sympos.+Appl.+Math.%2C+Vol.+XIX&amp;rft.pages=153-175&amp;rft.pub=Amer.+Math.+Soc.&amp;rft.date=1967&amp;rft.aulast=Rabin&amp;rft.aufirst=Michael+O.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span></span> </li> <li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFCobham1965" class="citation conference cs1"><a href="/wiki/Alan_Cobham_(mathematician)" title="Alan Cobham (mathematician)">Cobham, Alan</a> (1965). "The intrinsic computational difficulty of functions". <i>Logic, Methodology and Philos. Sci. (Proc. 1964 Internat. Congr.)</i>. pp.&#160;24–30.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=conference&amp;rft.atitle=The+intrinsic+computational+difficulty+of+functions&amp;rft.btitle=Logic%2C+Methodology+and+Philos.+Sci.+%28Proc.+1964+Internat.+Congr.%29&amp;rft.pages=24-30&amp;rft.date=1965&amp;rft.aulast=Cobham&amp;rft.aufirst=Alan&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span></span> </li> <li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFEdmonds1965" class="citation journal cs1"><a href="/wiki/Jack_Edmonds" title="Jack Edmonds">Edmonds, J.</a> (1965). "Paths, trees, and flowers". <i>Canadian J. Math</i>. <b>17</b>: 449–467. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.4153%2FCJM-1965-045-4">10.4153/CJM-1965-045-4</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Canadian+J.+Math.&amp;rft.atitle=Paths%2C+trees%2C+and+flowers&amp;rft.volume=17&amp;rft.pages=449-467&amp;rft.date=1965&amp;rft_id=info%3Adoi%2F10.4153%2FCJM-1965-045-4&amp;rft.aulast=Edmonds&amp;rft.aufirst=J.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span></span> </li> <li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFPocklington1910–1912" class="citation journal cs1"><a href="/wiki/H._C._Pocklington" class="mw-redirect" title="H. C. Pocklington">Pocklington, H. C.</a> (1910–1912). "The determination of the exponent to which a number belongs, the practical solution of certain congruences, and the law of quadratic reciprocity". <i>Proc. Camb. Phil. Soc</i>. <b>16</b>: 1–5.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Proc.+Camb.+Phil.+Soc.&amp;rft.atitle=The+determination+of+the+exponent+to+which+a+number+belongs%2C+the+practical+solution+of+certain+congruences%2C+and+the+law+of+quadratic+reciprocity&amp;rft.volume=16&amp;rft.pages=1-5&amp;rft.date=1910%2F1912&amp;rft.aulast=Pocklington&amp;rft.aufirst=H.+C.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span></span> </li> <li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFGautschi1994" class="citation book cs1"><a href="/wiki/Walter_Gautschi" title="Walter Gautschi">Gautschi, Walter</a> (1994). <i>Mathematics of computation, 1943–1993: a half-century of computational mathematics: Mathematics of Computation 50th Anniversary Symposium, August 9–13, 1993, Vancouver, British Columbia</i>. Providence, RI: American Mathematical Society. pp.&#160;503–504. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-8218-0291-5" title="Special:BookSources/978-0-8218-0291-5"><bdi>978-0-8218-0291-5</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Mathematics+of+computation%2C+1943%E2%80%931993%3A+a+half-century+of+computational+mathematics%3A+Mathematics+of+Computation+50th+Anniversary+Symposium%2C+August+9%E2%80%9313%2C+1993%2C+Vancouver%2C+British+Columbia&amp;rft.place=Providence%2C+RI&amp;rft.pages=503-504&amp;rft.pub=American+Mathematical+Society&amp;rft.date=1994&amp;rft.isbn=978-0-8218-0291-5&amp;rft.aulast=Gautschi&amp;rft.aufirst=Walter&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span></span> </li> </ol></div></div> <div class="mw-heading mw-heading2"><h2 id="References">References</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=P_(complexity)&amp;action=edit&amp;section=9" title="Edit section: References"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFEdmonds1965" class="citation journal cs1"><a href="/wiki/Jack_Edmonds" title="Jack Edmonds">Edmonds, J.</a> (1965). "Paths, trees, and flowers". <i>Canadian J. Math</i>. <b>17</b>: 449–467. <a href="/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.4153%2FCJM-1965-045-4">10.4153/CJM-1965-045-4</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Canadian+J.+Math.&amp;rft.atitle=Paths%2C+trees%2C+and+flowers&amp;rft.volume=17&amp;rft.pages=449-467&amp;rft.date=1965&amp;rft_id=info%3Adoi%2F10.4153%2FCJM-1965-045-4&amp;rft.aulast=Edmonds&amp;rft.aufirst=J.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFCobham1965" class="citation book cs1"><a href="/wiki/Alan_Cobham_(mathematician)" title="Alan Cobham (mathematician)">Cobham, Alan</a> (1965). "The intrinsic computational difficulty of functions". <i>Proc. Logic, Methodology, and Philosophy of Science II 1964</i>. North Holland.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.atitle=The+intrinsic+computational+difficulty+of+functions&amp;rft.btitle=Proc.+Logic%2C+Methodology%2C+and+Philosophy+of+Science+II+1964&amp;rft.pub=North+Holland&amp;rft.date=1965&amp;rft.aulast=Cobham&amp;rft.aufirst=Alan&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFRabin1967" class="citation conference cs1"><a href="/wiki/Michael_O._Rabin" title="Michael O. Rabin">Rabin, Michael O.</a> (1967). "Mathematical theory of automata". <i>Mathematical Aspects of Computer Science. Proc. 1966 Sympos. Appl. Math., Vol. XIX</i>. Amer. Math. Soc. pp.&#160;153–175.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=conference&amp;rft.atitle=Mathematical+theory+of+automata&amp;rft.btitle=Mathematical+Aspects+of+Computer+Science.+Proc.+1966+Sympos.+Appl.+Math.%2C+Vol.+XIX&amp;rft.pages=153-175&amp;rft.pub=Amer.+Math.+Soc.&amp;rft.date=1967&amp;rft.aulast=Rabin&amp;rft.aufirst=Michael+O.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span></li> <li><a href="/wiki/Thomas_H._Cormen" title="Thomas H. Cormen">Thomas H. Cormen</a>, <a href="/wiki/Charles_E._Leiserson" title="Charles E. Leiserson">Charles E. Leiserson</a>, <a href="/wiki/Ronald_L._Rivest" class="mw-redirect" title="Ronald L. Rivest">Ronald L. Rivest</a>, and <a href="/wiki/Clifford_Stein" title="Clifford Stein">Clifford Stein</a>. <i><a href="/wiki/Introduction_to_Algorithms" title="Introduction to Algorithms">Introduction to Algorithms</a></i>, Second Edition. MIT Press and McGraw–Hill, 2001. <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/0-262-03293-7" title="Special:BookSources/0-262-03293-7">0-262-03293-7</a>. Section 34.1: Polynomial time, pp.&#160;971&#8211;979.</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFPapadimitriou1994" class="citation book cs1"><a href="/wiki/Christos_H._Papadimitriou" class="mw-redirect" title="Christos H. Papadimitriou">Papadimitriou, Christos H.</a> (1994). <i>Computational complexity</i>. Reading, Mass.: Addison–Wesley. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-201-53082-7" title="Special:BookSources/978-0-201-53082-7"><bdi>978-0-201-53082-7</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Computational+complexity&amp;rft.place=Reading%2C+Mass.&amp;rft.pub=Addison%E2%80%93Wesley&amp;rft.date=1994&amp;rft.isbn=978-0-201-53082-7&amp;rft.aulast=Papadimitriou&amp;rft.aufirst=Christos+H.&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFSipser2006" class="citation book cs1"><a href="/wiki/Michael_Sipser" title="Michael Sipser">Sipser, Michael</a> (2006). <i>Introduction to the Theory of Computation, 2nd Edition</i>. Course Technology Inc. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/wiki/Special:BookSources/978-0-534-95097-2" title="Special:BookSources/978-0-534-95097-2"><bdi>978-0-534-95097-2</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Introduction+to+the+Theory+of+Computation%2C+2nd+Edition&amp;rft.pub=Course+Technology+Inc&amp;rft.date=2006&amp;rft.isbn=978-0-534-95097-2&amp;rft.aulast=Sipser&amp;rft.aufirst=Michael&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AP+%28complexity%29" class="Z3988"></span> Section 7.2: The Class P, pp.&#160;256&#8211;263;.</li></ul> <div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=P_(complexity)&amp;action=edit&amp;section=10" title="Edit section: External links"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><i><a href="/wiki/Complexity_Zoo" class="mw-redirect" title="Complexity Zoo">Complexity Zoo</a></i>: <a rel="nofollow" class="external text" href="https://complexityzoo.net/Complexity_Zoo:P#p">Class P</a></li> <li><i><a href="/wiki/Complexity_Zoo" class="mw-redirect" title="Complexity Zoo">Complexity Zoo</a></i>: <a rel="nofollow" class="external text" href="https://complexityzoo.net/Complexity_Zoo:P#ppoly">Class P/poly</a></li></ul> <div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}</style><style data-mw-deduplicate="TemplateStyles:r1236075235">.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}</style></div><div role="navigation" class="navbox" aria-labelledby="Complexity_classes" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><style data-mw-deduplicate="TemplateStyles:r1239400231">.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}</style><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:Complexity_classes" title="Template:Complexity classes"><abbr title="View this template">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:Complexity_classes" title="Template talk:Complexity classes"><abbr title="Discuss this template">t</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:EditPage/Template:Complexity_classes" title="Special:EditPage/Template:Complexity classes"><abbr title="Edit this template">e</abbr></a></li></ul></div><div id="Complexity_classes" style="font-size:114%;margin:0 4em"><a href="/wiki/Complexity_class" title="Complexity class">Complexity classes</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">Considered feasible</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/DLOGTIME" title="DLOGTIME">DLOGTIME</a></li> <li><a href="/wiki/AC0" title="AC0">AC<sup>0</sup></a></li> <li><a href="/wiki/ACC0" title="ACC0">ACC<sup>0</sup></a></li> <li><a href="/wiki/TC0" title="TC0">TC<sup>0</sup></a></li> <li><a href="/wiki/L_(complexity)" title="L (complexity)">L</a></li> <li><a href="/wiki/SL_(complexity)" title="SL (complexity)">SL</a></li> <li><a href="/wiki/RL_(complexity)" title="RL (complexity)">RL</a></li> <li><a href="/wiki/FL_(complexity)" title="FL (complexity)">FL</a></li> <li><a href="/wiki/NL_(complexity)" title="NL (complexity)">NL</a> <ul><li><a href="/wiki/NL-complete" title="NL-complete">NL-complete</a></li></ul></li> <li><a href="/wiki/NC_(complexity)" title="NC (complexity)">NC</a></li> <li><a href="/wiki/SC_(complexity)" title="SC (complexity)">SC</a></li> <li><a href="/wiki/CC_(complexity)" title="CC (complexity)">CC</a></li> <li><a class="mw-selflink selflink">P</a> <ul><li><a href="/wiki/P-complete" title="P-complete">P-complete</a></li></ul></li> <li><a href="/wiki/ZPP_(complexity)" title="ZPP (complexity)">ZPP</a></li> <li><a href="/wiki/RP_(complexity)" title="RP (complexity)">RP</a></li> <li><a href="/wiki/BPP_(complexity)" title="BPP (complexity)">BPP</a></li> <li><a href="/wiki/BQP" title="BQP">BQP</a></li> <li><a href="/wiki/APX" title="APX">APX</a></li> <li><a href="/wiki/FP_(complexity)" title="FP (complexity)">FP</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Suspected infeasible</th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/UP_(complexity)" title="UP (complexity)">UP</a></li> <li><a href="/wiki/NP_(complexity)" title="NP (complexity)">NP</a> <ul><li><a href="/wiki/NP-completeness" title="NP-completeness">NP-complete</a></li> <li><a href="/wiki/NP-hardness" title="NP-hardness">NP-hard</a></li> <li><a href="/wiki/Co-NP" title="Co-NP">co-NP</a></li> <li><a href="/wiki/Co-NP-complete" title="Co-NP-complete">co-NP-complete</a></li></ul></li> <li><a href="/wiki/TFNP" title="TFNP">TFNP</a></li> <li><a href="/wiki/FNP_(complexity)" title="FNP (complexity)">FNP</a></li> <li><a href="/wiki/Arthur%E2%80%93Merlin_protocol" title="Arthur–Merlin protocol">AM</a></li> <li><a href="/wiki/QMA" title="QMA">QMA</a></li> <li><a href="/wiki/PH_(complexity)" title="PH (complexity)">PH</a></li> <li><a href="/wiki/Parity_P" title="Parity P">⊕P</a></li> <li><a href="/wiki/PP_(complexity)" title="PP (complexity)">PP</a></li> <li><a href="/wiki/%E2%99%AFP" title="♯P">#P</a> <ul><li><a href="/wiki/%E2%99%AFP-complete" title="♯P-complete">#P-complete</a></li></ul></li> <li><a href="/wiki/IP_(complexity)" title="IP (complexity)">IP</a></li> <li><a href="/wiki/PSPACE" title="PSPACE">PSPACE</a> <ul><li><a href="/wiki/PSPACE-complete" title="PSPACE-complete">PSPACE-complete</a></li></ul></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Considered infeasible</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/EXPTIME" title="EXPTIME">EXPTIME</a></li> <li><a href="/wiki/NEXPTIME" title="NEXPTIME">NEXPTIME</a></li> <li><a href="/wiki/EXPSPACE" title="EXPSPACE">EXPSPACE</a></li> <li><a href="/wiki/2-EXPTIME" title="2-EXPTIME">2-EXPTIME</a></li> <li><a href="/wiki/ELEMENTARY" title="ELEMENTARY">ELEMENTARY</a></li> <li><a href="/wiki/PR_(complexity)" title="PR (complexity)">PR</a></li> <li><a href="/wiki/R_(complexity)" title="R (complexity)">R</a></li> <li><a href="/wiki/RE_(complexity)" title="RE (complexity)">RE</a></li> <li><a href="/wiki/ALL_(complexity)" title="ALL (complexity)">ALL</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Class hierarchies</th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Polynomial_hierarchy" title="Polynomial hierarchy">Polynomial hierarchy</a></li> <li><a href="/wiki/Exponential_hierarchy" title="Exponential hierarchy">Exponential hierarchy</a></li> <li><a href="/wiki/Grzegorczyk_hierarchy" title="Grzegorczyk hierarchy">Grzegorczyk hierarchy</a></li> <li><a href="/wiki/Arithmetical_hierarchy" title="Arithmetical hierarchy">Arithmetical hierarchy</a></li> <li><a href="/wiki/Boolean_hierarchy" title="Boolean hierarchy">Boolean hierarchy</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Families of classes</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/DTIME" title="DTIME">DTIME</a></li> <li><a href="/wiki/NTIME" title="NTIME">NTIME</a></li> <li><a href="/wiki/DSPACE" title="DSPACE">DSPACE</a></li> <li><a href="/wiki/NSPACE" title="NSPACE">NSPACE</a></li> <li><a href="/wiki/Probabilistically_checkable_proof" title="Probabilistically checkable proof">Probabilistically checkable proof</a></li> <li><a href="/wiki/Interactive_proof_system" title="Interactive proof system">Interactive proof system</a></li></ul> </div></td></tr><tr><td class="navbox-abovebelow" colspan="2"><div><a href="/wiki/List_of_complexity_classes" title="List of complexity classes">List of complexity classes</a></div></td></tr></tbody></table></div> <!-- NewPP limit report Parsed by mw‐api‐ext.eqiad.main‐6696b4cc84‐j2q7t Cached time: 20241122142018 Cache expiry: 2592000 Reduced expiry: false Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 0.413 seconds Real time usage: 0.562 seconds Preprocessor visited node count: 1495/1000000 Post‐expand include size: 44504/2097152 bytes Template argument size: 745/2097152 bytes Highest expansion depth: 14/100 Expensive parser function count: 1/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 77373/5000000 bytes Lua time usage: 0.264/10.000 seconds Lua memory usage: 5040853/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 430.840 1 -total 43.04% 185.428 1 Template:Reflist 29.95% 129.019 11 Template:Cite_book 23.59% 101.648 1 Template:ComplexityClasses 22.87% 98.526 1 Template:Navbox 16.08% 69.268 1 Template:Short_description 9.54% 41.116 2 Template:Pagetype 7.42% 31.949 1 Template:Isbn 6.17% 26.602 5 Template:Cite_conference 5.48% 23.607 4 Template:Cite_journal --> <!-- Saved in parser cache with key enwiki:pcache:idhash:658550-0!canonical and timestamp 20241122142018 and revision id 1255594714. Rendering was triggered because: api-parse --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=P_(complexity)&amp;oldid=1255594714">https://en.wikipedia.org/w/index.php?title=P_(complexity)&amp;oldid=1255594714</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Help:Category" title="Help:Category">Category</a>: <ul><li><a href="/wiki/Category:Complexity_classes" title="Category:Complexity classes">Complexity classes</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Hidden categories: <ul><li><a href="/wiki/Category:Articles_with_short_description" title="Category:Articles with short description">Articles with short description</a></li><li><a href="/wiki/Category:Short_description_is_different_from_Wikidata" title="Category:Short description is different from Wikidata">Short description is different from Wikidata</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 5 November 2024, at 19:04<span class="anonymous-show">&#160;(UTC)</span>.</li> <li id="footer-info-copyright">Text is available under the <a href="/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License" title="Wikipedia:Text of the Creative Commons Attribution-ShareAlike 4.0 International License">Creative Commons Attribution-ShareAlike 4.0 License</a>; additional terms may apply. By using this site, you agree to the <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use" class="extiw" title="foundation:Special:MyLanguage/Policy:Terms of Use">Terms of Use</a> and <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy" class="extiw" title="foundation:Special:MyLanguage/Policy:Privacy policy">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a rel="nofollow" class="external text" href="https://wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=P_(complexity)&amp;mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-6d67bf974d-c7nhj","wgBackendResponseTime":149,"wgPageParseReport":{"limitreport":{"cputime":"0.413","walltime":"0.562","ppvisitednodes":{"value":1495,"limit":1000000},"postexpandincludesize":{"value":44504,"limit":2097152},"templateargumentsize":{"value":745,"limit":2097152},"expansiondepth":{"value":14,"limit":100},"expensivefunctioncount":{"value":1,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":77373,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 430.840 1 -total"," 43.04% 185.428 1 Template:Reflist"," 29.95% 129.019 11 Template:Cite_book"," 23.59% 101.648 1 Template:ComplexityClasses"," 22.87% 98.526 1 Template:Navbox"," 16.08% 69.268 1 Template:Short_description"," 9.54% 41.116 2 Template:Pagetype"," 7.42% 31.949 1 Template:Isbn"," 6.17% 26.602 5 Template:Cite_conference"," 5.48% 23.607 4 Template:Cite_journal"]},"scribunto":{"limitreport-timeusage":{"value":"0.264","limit":"10.000"},"limitreport-memusage":{"value":5040853,"limit":52428800}},"cachereport":{"origin":"mw-api-ext.eqiad.main-6696b4cc84-j2q7t","timestamp":"20241122142018","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"P (complexity)","url":"https:\/\/en.wikipedia.org\/wiki\/P_(complexity)","sameAs":"http:\/\/www.wikidata.org\/entity\/Q846354","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q846354","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2004-05-16T14:50:05Z","dateModified":"2024-11-05T19:04:41Z","headline":"computational complexity class of problems"}</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10