# If a problem C is NP hard and there is an existing reduction from/to A,B,D, are they NP hard as well?

Lets say there is an reduction in polynomial time from problem A to B, from problem B to C and from problem C to D. Now lets say C is NP hard. Does this mean A,B,D are NP hard as well?

• I suggest you refresh the basic definitions and remember the intuition that X reduces to Y means that solving Y is at least as hard as solving X. – David Richerby May 31 at 7:33

There exists a reduction (many-to-one polynomial time) from a problem (or language) $$A$$ to a problem $$B$$, denoted $$A \leq_{\textsf{p}}^{\textsf{m}} B$$, if there exists a function $$f$$, computable in polynomial time in the size of the entry, so that $$x\in A \Leftrightarrow f(x) \in B$$.
It means that if you are able to solve any instance of the problem $$B$$, then for an instance $$x$$ of the problem $$A$$, you can transform it into $$f(x)$$, solve it like a problem of $$B$$, and it gives you the answer for the instance $$x$$.
In your case, if $$A \leq_{\textsf{p}}^{\textsf{m}} B \leq_{\textsf{p}}^{\textsf{m}} C \leq_{\textsf{p}}^{\textsf{m}} D$$ and $$C$$ is $$\textsf{NP}$$-hard, then it implies that $$D$$ is $$\textsf{NP}$$-hard. But if $$C$$ is $$\textsf{NP}$$, it implies that $$A$$ and $$B$$ are $$\textsf{NP}$$ (since hardness gives a lower bound and $$\textsf{NP}$$ gives an upper bound).
• So if $C$ is NP hard, it only implies that $D$ is in NP. It does not tell anything about $A$ and $B$ right? – gamma May 31 at 8:46
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 22, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9355430006980896, "perplexity": 205.1818380700569}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-35/segments/1566027317037.24/warc/CC-MAIN-20190822084513-20190822110513-00383.warc.gz"}