Title: Paulami Bhosle — R23-T059: Measure how blockchain/simple_proof_of_work.py scales · Issue #59 · S-AI-Projects/TheAlgorithms-Python · GitHub
Open Graph Title: Paulami Bhosle — R23-T059: Measure how blockchain/simple_proof_of_work.py scales · Issue #59 · S-AI-Projects/TheAlgorithms-Python
X Title: Paulami Bhosle — R23-T059: Measure how blockchain/simple_proof_of_work.py scales · Issue #59 · S-AI-Projects/TheAlgorithms-Python
Description: Student: Paulami Bhosle Task: R23-T059 · 9 of 10 Repository: https://github.com/S-AI-Projects/TheAlgorithms-Python Assigned working branch: student/e26b07f0792 Goal Check the algorithm's real running time against its theoretical complexi...
Open Graph Description: Student: Paulami Bhosle Task: R23-T059 · 9 of 10 Repository: https://github.com/S-AI-Projects/TheAlgorithms-Python Assigned working branch: student/e26b07f0792 Goal Check the algorithm's real runni...
X Description: Student: Paulami Bhosle Task: R23-T059 · 9 of 10 Repository: https://github.com/S-AI-Projects/TheAlgorithms-Python Assigned working branch: student/e26b07f0792 Goal Check the algorithm's real r...
Opengraph URL: https://github.com/S-AI-Projects/TheAlgorithms-Python/issues/59
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Paulami Bhosle — R23-T059: Measure how blockchain/simple_proof_of_work.py scales","articleBody":"\u003c!-- sai-task-v1:R23-T059 -->\n\n## Student: Paulami Bhosle\n\n**Task:** R23-T059 · 9 of 10\n**Repository:** https://github.com/S-AI-Projects/TheAlgorithms-Python\n**Assigned working branch:** `student/e26b07f0792`\n\n## Goal\n\nCheck the algorithm's real running time against its theoretical complexity. Expected attempts grow ×16 per extra leading hex zero – measure attempts and time for difficulty 1–5.\n\n## Steps\n\n1. State the expected time complexity with a short derivation.\n2. Write work/R23-T059/bench.py timing the main function with `timeit` for at least 6 input sizes (doubling).\n3. Plot time vs n (matplotlib) and compare with the expected curve.\n4. Add the complexity, with your evidence, to the function's docstring.\n5. Make the code change in the repository: blockchain/simple_proof_of_work.py: expected-attempts complexity (16^difficulty) in the docstring, backed by your measurements. Re-run the automated check and the repo's own tests afterwards.\n6. Prepare the PR: on branch R23-T059, commit the code change plus your work/R23-T059/ evidence, put your findings in the PR description and open the PR against the org fork. For a later upstream PR, create a second branch containing only the code change (no work/ folder).\n\n## Done when\n\n☐ bench.py measures attempts and time for difficulty 1–5 (at least 20 runs each), showing ≈16× growth per level.\n☐ blockchain/simple_proof_of_work.py docstring states the expected 16^difficulty attempts, matching the measurements.\n☐ Existing 7 doctests and the negative-difficulty raise are unchanged.\n\n\u003cdetails>\n\u003csummary>Additional task guidance\u003c/summary>\n\n\nAdditional curated task guidance\n\nItem:\n`blockchain/simple_proof_of_work.py` (62 lines; 7 doctests)\n\nTask type:\nMeasure complexity\n\nCode change (goes into the PR):\nblockchain/simple_proof_of_work.py: expected-attempts complexity (16^difficulty) in the docstring, backed by your measurements.\n\nAutomated check:\nuv run python work/R23-T059/bench.py && uv run pytest blockchain/simple_proof_of_work.py\n\nPrerequisites:\nLinux/WSL2/Codespaces with uv (https://docs.astral.sh/uv/getting-started/installation/); run `uv sync --group=test` once – it installs the Python version CI uses (.python-version = 3.15t) and the test dependencies, about 1–2 GB\n\nUpstream PR rules:\nFollow CONTRIBUTING.md: type hints on every parameter/return, doctests for valid and erroneous input, snake_case file names, no duplicate of an existing implementation, no hand edits to DIRECTORY.md. CI (pytest with doctests, ruff) must pass – bots close PRs without tests or type hints. Keep work/ (benchmarks, notes, property tests) out of the upstream branch; put results in the PR description.\n\nSource (pinned):\nhttps://github.com/TheAlgorithms/Python/blob/574d100b7181956e9c8384552fd078165e4cc326/blockchain/simple_proof_of_work.py\n\nChange:\nNo change recorded\n\nPR destination:\nPreserved pilot guidance\n\n\n\u003c/details>\n\n## Submission checklist\n\n- [ ] Complete this task and its checks.\n- [ ] Add the required evidence and link your pull request here.\n- [ ] Select this **S-AI-Projects fork** as the PR base repository.\n- [ ] Request instructor review.\n\nKeep this PR focused on this task. Do not submit assignment PRs to the upstream repository.","author":{"url":"https://github.com/ankushbisht01","@type":"Person","name":"ankushbisht01"},"datePublished":"2026-11-03T18:46:53Z","url":"https://github.com/S-AI-Projects/TheAlgorithms-Python/issues/59"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:86f3f061-bad4-5e4e-d6f7-0193e9d2319d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EB48:1B070A:C7443:121010:6AFDC0AB |
| html-safe-nonce | fbb436d965877a070fd190821e3dfdb29563e3476813b54645c6390741d9ddd5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjQ4OjFCMDcwQTpDNzQ0MzoxMjEwMTA6NkFGREMwQUIiLCJ2aXNpdG9yX2lkIjoiODkwNDMyNjk1NTc3NjQ1ODkyMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 99391ae14c24f6fc4ec8263055ab8f39859cceff706eea6af62d23fbeaaf790a |
| hovercard-subject-tag | issue:6189031402 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/S-AI-Projects/TheAlgorithms-Python/59/issue_layout |
| twitter:image | https://opengraph.githubassets.com/60e1fb24e082f4a897d30bf8df1e5308985ecd8f381db834c5a6865e1251a257/S-AI-Projects/TheAlgorithms-Python/issues/59 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/60e1fb24e082f4a897d30bf8df1e5308985ecd8f381db834c5a6865e1251a257/S-AI-Projects/TheAlgorithms-Python/issues/59 |
| og:image:alt | Student: Paulami Bhosle Task: R23-T059 · 9 of 10 Repository: https://github.com/S-AI-Projects/TheAlgorithms-Python Assigned working branch: student/e26b07f0792 Goal Check the algorithm's real runni... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ankushbisht01 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 35c6bf57da1370dc64866160540c0ee9f825f291935b3bf6ec5492b00e35f3a6 |
| turbo-cache-control | no-preview |
| go-import | github.com/S-AI-Projects/TheAlgorithms-Python git https://github.com/S-AI-Projects/TheAlgorithms-Python.git |
| octolytics-dimension-user_id | 351892385 |
| octolytics-dimension-user_login | S-AI-Projects |
| octolytics-dimension-repository_id | 1444141022 |
| octolytics-dimension-repository_nwo | S-AI-Projects/TheAlgorithms-Python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 63476337 |
| octolytics-dimension-repository_parent_nwo | TheAlgorithms/Python |
| octolytics-dimension-repository_network_root_id | 63476337 |
| octolytics-dimension-repository_network_root_nwo | TheAlgorithms/Python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ab48c73a2978548773f5f24717ed9e58508befdb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width