{"about":{"non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","site":"https://codewithpapers.app","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page","syntology":{"site":"https://syntology.ai","developers":"https://syntology.ai/developers","mcp":{"server":"https://syntology.ai/mcp","transport":"streamable-http","server_card":"https://syntology.ai/.well-known/mcp/server-card.json","auth":{"type":"trial token, no account","trial_token":"https://syntology.ai/api/oauth/trial/token","method":"POST","docs":"https://syntology.ai/developers"}},"have":"https://syntology.ai/api/graph/have?x=<method, arXiv id or title> (free, answers coverage only)","paper_base":"https://syntology.ai/paper/","atlas_base":"https://app.syntology.ai/?focus="},"machine_readable":[{"url":"https://codewithpapers.app/llms.txt","what":"the machine catalog: every machine-readable file, counted"},{"url":"https://codewithpapers.app/index/manifest.json","what":"paper-to-code index by arXiv id, with Syntology's counts"},{"url":"https://codewithpapers.app/search/manifest.json","what":"site search index (titles, authors) and its files"},{"url":"https://codewithpapers.app/download","what":"bulk files: Syntology's layer, described there"},{"url":"https://codewithpapers.app/build_manifest.json","what":"the build record: inputs, counts, exclusions, probes"}]},"url":"/paper/optimal-approximate-sampling-from-discrete","title":"Optimal Approximate Sampling from Discrete Probability Distributions","arxiv_id":"2001.04555","date":"2020-01-13","proceeding":null,"authors":["Feras A. Saad","Cameron E. Freer","Martin C. Rinard","Vikash K. Mansinghka"],"abstract":"This paper addresses a fundamental problem in random variate generation: given access to a random source that emits a stream of independent fair bits, what is the most accurate and entropy-efficient algorithm for sampling from a discrete probability distribution $(p_1, \\dots, p_n)$, where the probabilities of the output distribution $(\\hat{p}_1, \\dots, \\hat{p}_n)$ of the sampling algorithm must be specified using at most $k$ bits of precision? We present a theoretical framework for formulating this problem and provide new techniques for finding sampling algorithms that are optimal both statistically (in the sense of sampling accuracy) and information-theoretically (in the sense of entropy consumption). We leverage these results to build a system that, for a broad family of measures of statistical accuracy, delivers a sampling algorithm whose expected entropy usage is minimal among those that induce the same distribution (i.e., is \"entropy-optimal\") and whose output distribution $(\\hat{p}_1, \\dots, \\hat{p}_n)$ is a closest approximation to the target distribution $(p_1, \\dots, p_n)$ among all entropy-optimal sampling algorithms that operate within the specified $k$-bit precision. This optimal approximate sampler is also a closer approximation than any (possibly entropy-suboptimal) sampler that consumes a bounded amount of entropy with the specified precision, a class which includes floating-point implementations of inversion sampling and related methods found in many software libraries. We evaluate the accuracy, entropy consumption, precision requirements, and wall-clock runtime of our optimal approximate sampling algorithms on a broad set of distributions, demonstrating the ways that they are superior to existing approximate samplers and establishing that they often consume significantly fewer resources than are needed by exact samplers.","url_abs":"http://arxiv.org/abs/2001.04555v1","url_pdf":"http://arxiv.org/pdf/2001.04555v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"optimal-approximate-sampling-from-discrete","repo_url":"https://github.com/probcomp/optimal-approximate-sampling","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"optimal-approximate-sampling-from-discrete","repo_url":"https://github.com/maciej-bendkowski/boltzmann-brain","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"paper_slug":"optimal-approximate-sampling-from-discrete","repo_url":"https://github.com/maciej-bendkowski/generic-boltzmann-brain","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2001.04555","atlas_url":"https://app.syntology.ai/?focus=2001.04555","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2001.04555"},"calls":[{"tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2001.04555"},"returns":"the samples harvested from this paper, each with its run record; it does not verify the paper"},{"tool":"get_code","arguments_in":"samples[].code_sha256","returns":"one stored sample by its code_sha256; not shown on this site"}]},"developers":"https://syntology.ai/developers","held":true,"reason":"in_graph_layer","checked_against":null,"agent_calls":[{"tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2001.04555"},"call":"get_harvested_code_for_paper(arxiv_id=\"2001.04555\")"},{"tool":"get_code","arguments_in":{"code_sha256":"syntology.samples[].code_sha256"},"call":"get_code(code_sha256=\"…\")"},{"tool":"get_citation_path","arguments":{"paper_1":"2001.04555"},"arguments_in":{"paper_2":"another paper's arXiv id or title"},"call":"get_citation_path(paper_1=\"2001.04555\", paper_2=\"…\")"},{"tool":"get_concepts_for_paper","arguments":{"arxiv_id":"2001.04555"},"call":"get_concepts_for_paper(arxiv_id=\"2001.04555\")"}],"by_repo":[{"repo":"probcomp/optimal-approximate-sampling","kind":"official","samples":22,"ran":11,"instrument":0,"unverified":11},{"repo":"maciej-bendkowski/boltzmann-brain","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0},{"repo":"maciej-bendkowski/generic-boltzmann-brain","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0}],"by_repo_is":"one row per repository in the archive's code links, Syntology's graph links or the samples; samples 0 means no sample is linked to this paper, a statement about Syntology's coverage, not about the repository: with harvested_for_other_papers present, Syntology harvested the repository for that many other papers, and without it, Syntology harvested nothing from it; placed_by_identical_code counts samples whose link records no repository, placed here because identical code was harvested from this repository for another paper; ran counts executions on a synthesized input and instrument counts failures of Syntology's instrument, not of the code","read_at":"2026-10-05T00:36:11+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","ran_record":{"url":"https://syntology.ai/api/ran/2001.04555.json","schema":"syntology.ran_record/1","counts_crosswalk":{"n_samples":"syntology.counts.lifted","n_ran":"syntology.counts.executed","n_ran_checked":"syntology.counts.checked","n_instrument":"syntology.counts.instrument_failures","n_unverified":"syntology.counts.no_recorded_run"},"note":"live record, measured at request time; may be newer than this page's graph read","badge":"https://syntology.ai/api/ran/2001.04555.svg"},"claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/maciej-bendkowski/generic-boltzmann-brain","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/maciej-bendkowski/boltzmann-brain","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/probcomp/optimal-approximate-sampling","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":11,"unverified":11},"n_samples":22,"n_ran":11,"n_constructed":0,"n_ran_checked":11,"n_instrument":0,"n_unverified":11,"n_instrument_is":"failures of Syntology's instrument, not of the code","every_run_is_an_instrument_failure":false,"key_notes":{"n_ran_checked":"legacy name, kept unchanged so existing readers do not break: it counts the samples that ran with no instrument failure (honoured, violated, and ran with no contract checked); it does not mean a contract was checked, and the pages print it as 'K with no instrument failure', not 'K checked'","n_constructed":"a sub-count of the samples that ran, never subtracted from them and never a failure: an executed sample whose run returned an instance of its own class (fixture_out_type equals the entry name): the run built an object and did not compute a result (Syntology's RAN record, counts.constructed)"},"by_repo_kind":{"official":{"samples":22,"ran":11,"n_ran_checked":11,"n_instrument":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"inline_ok_is":"inline_ok is true only when both licence gates allow Syntology to serve this code's text: this paper's link (inline_ok_link, from the licence of this paper's copy) and the stored copy of the same code that Syntology serves, which may have been first harvested from another repository. withheld_clause is Syntology's own wording of which gate keeps the text a pointer and why, and is null when inline_ok is true. This site shows no code text either way; n_pointer_only_for_licence counts samples with inline_ok false (both gates), n_pointer_only_link_allows those of them whose inline_ok_link is true","n_pointer_only_link_allows":0,"fixture_fields_is":{"signature_and_fixture_out_type":"the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right","level_recorded_at":"when Syntology's graph wrote the sample's verification level, not when the code executed; absent where the level was written before the date was kept, and never filled in with the build date","present_on":"samples that ran only; a key is absent, never empty, where the graph records nothing"},"n_ran_with_level_date":11,"n_ran_without_level_date":0,"n_ran_signature_not_shown":0,"levels_written_between":{"first":"2026-09-25","last":"2026-09-25","is":"the first and last UTC dates on which Syntology's graph wrote a verification level for a sample on this page that ran, not when the code executed"},"code_page_min_papers":5,"code_page_is":"a page for the entry name across every paper's harvested code; the name is a string, not an identity","samples":[{"code_sha256":"4cf28f8c3eba0421","code_sha256_prefix":"4cf28f8c3eba0421","entry":"get_common_denominator","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"signature":"probabilities:list/1/Fraction","fixture_out_type":"int","level_recorded_at":"2026-09-25T08:34:48.807261+00:00","code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"4cf28f8c3eba0421"}},{"code_sha256":"388e095eeeca2661","code_sha256_prefix":"388e095eeeca2661","entry":"get_common_numerators","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"signature":"Z:int/0/int, probabilities:list/1/float","fixture_out_type":"list","level_recorded_at":"2026-09-25T08:34:48.807261+00:00","code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"388e095eeeca2661"}},{"code_sha256":"e716cfd09ac434c7","code_sha256_prefix":"e716cfd09ac434c7","entry":"get_delta_error","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/opt.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/opt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"signature":"Z:int/0/int, p:float/0/float, M:int/0/int, delta:int/0/int, kernel:callable/0/?","fixture_out_type":"float","level_recorded_at":"2026-09-25T08:34:48.807261+00:00","code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"e716cfd09ac434c7"}},{"code_sha256":"4fa6c82bf596ac2b","code_sha256_prefix":"4fa6c82bf596ac2b","entry":"get_initial_Ms","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/opt.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/opt.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"signature":"Z:int/0/int, p_target:list/1/float, kernel:callable/0/?","fixture_out_type":"tuple","level_recorded_at":"2026-09-25T10:06:43.451432+00:00","code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"4fa6c82bf596ac2b"}},{"code_sha256":"8e3254232604c04a","code_sha256_prefix":"8e3254232604c04a","entry":"kernel_hellinger","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/divergences.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/divergences.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"signature":"a:float/0/float, b:float/0/float","fixture_out_type":"float","level_recorded_at":"2026-09-25T08:34:48.807261+00:00","retrieve_with":{"tool":"get_code","code_sha256":"8e3254232604c04a"},"code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"8e3254232604c04a"}},{"code_sha256":"7f88bdd1e0d18ad7","code_sha256_prefix":"7f88bdd1e0d18ad7","entry":"kernel_tv","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/divergences.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/divergences.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"signature":"a:Tensor/2/float, b:Tensor/2/float","fixture_out_type":"Tensor","level_recorded_at":"2026-09-25T08:34:48.807261+00:00","retrieve_with":{"tool":"get_code","code_sha256":"7f88bdd1e0d18ad7"},"code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"7f88bdd1e0d18ad7"}},{"code_sha256":"9a61b5ea009c49ab","code_sha256_prefix":"9a61b5ea009c49ab","entry":"lcm","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"signature":"a:int/0/int, b:int/0/int","fixture_out_type":"int","level_recorded_at":"2026-09-25T08:34:48.807261+00:00","retrieve_with":{"tool":"get_code","code_sha256":"9a61b5ea009c49ab"},"code_page":"/code/lcm","census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"9a61b5ea009c49ab"}},{"code_sha256":"9473b3dc91b4a9e3","code_sha256_prefix":"9473b3dc91b4a9e3","entry":"make_ddg_tree","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/tree.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/tree.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"signature":"P:list/1/list, k:int/0/int, l:int/0/int","fixture_out_type":"Node","level_recorded_at":"2026-09-25T08:34:48.807261+00:00","code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"9473b3dc91b4a9e3"}},{"code_sha256":"3ff5069ec587d49d","code_sha256_prefix":"3ff5069ec587d49d","entry":"make_hamming_vector","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/matrix.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/matrix.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"signature":"P:list/1/list","fixture_out_type":"list","level_recorded_at":"2026-09-25T08:34:48.807261+00:00","code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"3ff5069ec587d49d"}},{"code_sha256":"599e5c702aea357f","code_sha256_prefix":"599e5c702aea357f","entry":"make_leaf_table","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/tree.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/tree.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"signature":"P:list/1/list","fixture_out_type":"dict","level_recorded_at":"2026-09-25T10:37:12.143382+00:00","code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"599e5c702aea357f"}},{"code_sha256":"97a14f39df6e7aa7","code_sha256_prefix":"97a14f39df6e7aa7","entry":"pack_tree","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/packing.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/packing.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"signature":"enc:ndarray/1/int, node:TreeNode/0/?, offset:int/0/int","fixture_out_type":"int","level_recorded_at":"2026-09-25T08:34:48.807261+00:00","code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"97a14f39df6e7aa7"}},{"code_sha256":"7f7a7496ddb342a9","code_sha256_prefix":"7f7a7496ddb342a9","entry":"construct_sample_ky_encoding","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/construct.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/construct.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"7f7a7496ddb342a9"}},{"code_sha256":"6f620229d6782cd4","code_sha256_prefix":"6f620229d6782cd4","entry":"construct_sample_ky_matrix","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/construct.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/construct.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"6f620229d6782cd4"}},{"code_sha256":"8c103a34014ef59a","code_sha256_prefix":"8c103a34014ef59a","entry":"construct_sample_ky_matrix_cached","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/construct.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/construct.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"8c103a34014ef59a"}},{"code_sha256":"30463725333b18bb","code_sha256_prefix":"30463725333b18bb","entry":"find_optimal_indexes","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/opt.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/opt.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"30463725333b18bb"}},{"code_sha256":"b542fca2f1e4b985","code_sha256_prefix":"b542fca2f1e4b985","entry":"kernel_pchi2","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/divergences.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/divergences.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"b542fca2f1e4b985"}},{"code_sha256":"8d3912840cbc2ad0","code_sha256_prefix":"8d3912840cbc2ad0","entry":"make_ddg_matrix","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/matrix.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/matrix.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"8d3912840cbc2ad0"}},{"code_sha256":"18fdfd1e058d844d","code_sha256_prefix":"18fdfd1e058d844d","entry":"make_matrix","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/matrix.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/matrix.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"18fdfd1e058d844d"}},{"code_sha256":"4303f40052d64e52","code_sha256_prefix":"4303f40052d64e52","entry":"make_tree","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/tree.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/tree.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"4303f40052d64e52"}},{"code_sha256":"b8308fdb20d40153","code_sha256_prefix":"b8308fdb20d40153","entry":"sample_ky_encoding","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/sample.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/sample.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"b8308fdb20d40153"}},{"code_sha256":"f19d056c1eb9addc","code_sha256_prefix":"f19d056c1eb9addc","entry":"sample_ky_matrix","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/sample.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/sample.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"f19d056c1eb9addc"}},{"code_sha256":"2ff3534a77da0bc7","code_sha256_prefix":"2ff3534a77da0bc7","entry":"sample_ky_matrix_cached","repo":"probcomp/optimal-approximate-sampling","repo_kind":"official","path":"src/sample.py","file_url":"https://github.com/probcomp/optimal-approximate-sampling/blob/HEAD/src/sample.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"code_page":null,"census":null,"licence":"Apache-2.0","inline_ok":true,"inline_ok_link":true,"withheld_clause":null,"mcp_get_code":{"code_sha256":"2ff3534a77da0bc7"}}]},"code_links_note":null,"arxiv_metadata":null,"syntology_extracted_results":null,"record_sha256":"50a881e58960609dcafb5d740284e973cd8104a5f4be6bd0d391c51054737bbf","record_changed_at":"2026-09-28","record_changed_at_basis":"first_hashed"}