<jats:p>We present a quantum-inspired classical algorithm that can be used for graph-theoretical problems, such as finding the densest <a:math xmlns:a="http://www.w3.org/1998/Math/MathML" display="inline" overflow="scroll"><a:mi>k</a:mi></a:math> subgraph and finding the maximum weight clique, which are proposed as applications of a Gaussian boson sampler. The main observation from Gaussian boson samplers is that a given graph’s adjacency matrix to be encoded in a Gaussian boson sampler is non-negative and that computing the output probability of Gaussian boson sampling restricted to a non-negative adjacency matrix is thought to be strictly easier than general cases. We first provide how to program a given graph problem into our efficient classical algorithm. We then numerically compare the performance of ideal and lossy Gaussian boson samplers, our quantum-inspired classical sampler, and the uniform sampler for finding the densest <d:math xmlns:d="http://www.w3.org/1998/Math/MathML" display="inline" overflow="scroll"><d:mi>k</d:mi></d:math> subgraph and finding the maximum weight clique and show that the advantage from Gaussian boson samplers is not significant in general. We finally discuss the potential advantage of a Gaussian boson sampler over the proposed quantum-inspired classical sampler.</jats:p>
<jats:sec>
<jats:title/>
<jats:supplementary-material>
<jats:permissions>
<jats:copyright-statement>Published by the American Physical Society</jats:copyright-statement>
<jats:copyright-year>2024</jats:copyright-year>
</jats:permissions>
</jats:supplementary-material>
</jats:sec>