{"id":20915765,"url":"https://github.com/digital-technology-agency/math","last_synced_at":"2026-02-19T14:31:56.613Z","repository":{"id":49731916,"uuid":"375585163","full_name":"digital-technology-agency/math","owner":"digital-technology-agency","description":"Mathematical experiments. Combinatorics. Sorting algorithm. Many utils","archived":false,"fork":false,"pushed_at":"2021-06-16T08:11:35.000Z","size":323,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-21T04:42:55.207Z","etag":null,"topics":["algorithms","anagrams","card-information","combinatorics","fun","golang","letters","math","mathematics","mathjax","mathml","permutation","placements","sort","sorting-algorithms","utils"],"latest_commit_sha":null,"homepage":"https://dta.agency","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digital-technology-agency.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"digital-technology-agency"}},"created_at":"2021-06-10T05:51:17.000Z","updated_at":"2023-06-26T14:00:37.000Z","dependencies_parsed_at":"2022-08-30T10:32:02.620Z","dependency_job_id":null,"html_url":"https://github.com/digital-technology-agency/math","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/digital-technology-agency/math","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-technology-agency%2Fmath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-technology-agency%2Fmath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-technology-agency%2Fmath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-technology-agency%2Fmath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digital-technology-agency","download_url":"https://codeload.github.com/digital-technology-agency/math/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-technology-agency%2Fmath/sbom","scorecard":{"id":342108,"data":{"date":"2025-08-11","repo":{"name":"github.com/digital-technology-agency/math","commit":"db86eaad2d19befbceb0980d35f220a199fa43e9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/digital-technology-agency/math/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/digital-technology-agency/math/go.yml/master?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 1.0.12 not signed: https://api.github.com/repos/digital-technology-agency/math/releases/44707840","Warn: release artifact 1.0.11 not signed: https://api.github.com/repos/digital-technology-agency/math/releases/44640398","Warn: release artifact 1.0.10 not signed: https://api.github.com/repos/digital-technology-agency/math/releases/44514861","Warn: release artifact 1.0.9 not signed: https://api.github.com/repos/digital-technology-agency/math/releases/44514792","Warn: release artifact 1.0.12 does not have provenance: https://api.github.com/repos/digital-technology-agency/math/releases/44707840","Warn: release artifact 1.0.11 does not have provenance: https://api.github.com/repos/digital-technology-agency/math/releases/44640398","Warn: release artifact 1.0.10 does not have provenance: https://api.github.com/repos/digital-technology-agency/math/releases/44514861","Warn: release artifact 1.0.9 does not have provenance: https://api.github.com/repos/digital-technology-agency/math/releases/44514792"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T06:08:39.710Z","repository_id":49731916,"created_at":"2025-08-18T06:08:39.710Z","updated_at":"2025-08-18T06:08:39.710Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29618277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T13:04:20.082Z","status":"ssl_error","status_checked_at":"2026-02-19T13:03:33.775Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","anagrams","card-information","combinatorics","fun","golang","letters","math","mathematics","mathjax","mathml","permutation","placements","sort","sorting-algorithms","utils"],"created_at":"2024-11-18T16:18:15.355Z","updated_at":"2026-02-19T14:31:56.582Z","avatar_url":"https://github.com/digital-technology-agency.png","language":"Go","readme":"# Mathematical and algorithms experiments \n\n\u003cp\u003e\u003cimg src=\"https://rawcdn.githack.com/devicons/devicon/9c6bfdb9783cdfe1018666ed76adcfd3eab6fad6/icons/go/go-original.svg\" alt=\"go\" width=\"100\" height=\"100\"/\u003e\u003c/p\u003e\n\n# Intro\n[![GoDoc](https://godoc.org/github.com/digital-technology-agency/math?status.svg)](https://godoc.org/github.com/digital-technology-agency/math)\n[![Go](https://github.com/digital-technology-agency/math/actions/workflows/go.yml/badge.svg?branch=master)](https://github.com/digital-technology-agency/math/actions/workflows/go.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/digital-technology-agency/math)](https://goreportcard.com/report/github.com/digital-technology-agency/math)\n[![License](http://img.shields.io/badge/Licence-MIT-brightgreen.svg)](LICENSE)\n[![Website dta.agency](https://img.shields.io/website-up-down-green-red/http/shields.io.svg)](https://dta.agency)\n[![GitHub release](https://img.shields.io/github/v/release/digital-technology-agency/math)](https://github.com/digital-technology-agency/math/releases/latest)\n\u003cimg alt=\"open collective badge\" src=\"https://opencollective.com/dta-agency/tiers/backers/badge.svg?label=backer\u0026color=brightgreen\" /\u003e\n\n\u003cp\u003e\u0026nbsp;\u003cimg align=\"center\" src=\"https://github-readme-stats.vercel.app/api?username=digitaltechnologyagency\u0026show_icons=true\u0026count_private=true\" alt=\"Агентство цифровых технологий\" width=\"80%\"/\u003e\u003c/p\u003e\n\n\n## Menu\n`Sorted`\n* [Sort insertion](https://github.com/digital-technology-agency/math/wiki/Sort-insertion)\n* [Merge sort](https://github.com/digital-technology-agency/math/wiki/Merge-sort)\n\n`Mathematical`\n\n* [C from n to k](https://github.com/digital-technology-agency/math/wiki/C-from-n-to-k)\n* [Factorial](https://github.com/digital-technology-agency/math/wiki/Factorial)\n* [Permutation](https://github.com/digital-technology-agency/math/wiki/Permutation)\n* [Placements](https://github.com/digital-technology-agency/math/wiki/Placements)\n\n\n## Examples\n\n### C from n to k\n\n![Card information](./pic/c-from-n-to-k.png)\n\nLet there be **n** different objects. To find the number of combinations of **n** objects by **k**, we will choose combinations of **m** objects in all possible ways, while paying attention to the different composition of the combinations, but not the order (it is not important here, unlike the placements).\n\n### Factorial \n\n![Card information](./pic/factorial.svg)\n\nThe factorial operation is encountered in many areas of mathematics, notably in combinatorics, algebra, and mathematical analysis. Its most basic use counts the possible distinct sequences – the permutations – of **n** distinct objects: there are **n!**.\n\n### Permutations (n)\n\n### _**Pn** = **n!**_\n\nPermutations differ from combinations, which are selections of some members of a set regardless of order. For example, written as tuples, there are six permutations of the set {1,2,3}, namely: (1,2,3), (1,3,2), (2,1,3), (2,3,1), (3,1,2), and (3,2,1). These are all the possible orderings of this three-element set. Anagrams of words whose letters are different are also permutations: the letters are already ordered in the original word, and the anagram is a reordering of the letters. The study of permutations of finite sets is an important topic in the fields of combinatorics and group theory.\n\n\n### Placements (n)\n\n![Card information](./pic/placements.jpg)\n\nIf you are already familiar with combinations, then you will easily notice that in order to find placements, you need to take all possible combinations, and then change the order in each one in all possible ways (that is, in fact, make more **permutations**). Therefore, the number of placements is also expressed in terms of the number of permutations and combinations\n\n\n### Issues\n[![GitHub issues](https://img.shields.io/github/issues/digital-technology-agency/math?color=0A0ECD)](https://github.com/digital-technology-agency/math/issues?q=is%3Aopen+is%3Aissue)\n[![GitHub closed issues](https://img.shields.io/github/issues-closed/digital-technology-agency/math?style=flat)](https://github.com/digital-technology-agency/math/issues?q=is%3Aissue+is%3Aclosed)\n\n\n## Usage\n### [golang/cmd/go](https://golang.org/cmd/go/)\n\n```bash\ngo get github.com/digital-technology-agency/math/pkg/combinatorics\n```\n\n## Test\n\n```bash\ngo test -run ''\n```\n\n\n## Quickstart\n\n**C from n to k**\n\n```go\n\nimport \"github.com/digital-technology-agency/math/pkg/combinatorics\"\n\nfunc Example() {\n    n := 100\n    k := 3\n    value := combinatorics.CnkUint(n, k)\n\tfmt.Printf(\"Result: %d\", value)\n    /*\n        Result: 161700    \n    */ \n}\n```\n\n## Performance\n\nIf you don't need an ordered list of, *Process*'s would be the best choice for large n.\n\n  N |        n  |        k  |  Process \n---:|----------:|----------:|---------:\n  1 |       100 |         3 |   0.00s \n  2 |    100000 |         3 |   0.09s \n  3 |   1000000 |         3 |   3.52s \n\n**Factorial (n!)**\n\n```go\n\nimport \"github.com/digital-technology-agency/math/pkg/combinatorics\"\n\nfunc Example() {\n    n := 4\n    value := combinatorics.FactorialInt(n)\n\tfmt.Printf(\"Result: %d\", value)\n    /*\n        Result: 24    \n    */ \n}\n```\n\nIf you don't need an ordered list of factorial, *Process*'s would be the best choice for large n.\n\n  N |        n! | Process \n---:|----------:|--------:\n  1 |        10 |  0.00s \n  2 |    100000 |  0.16s \n  3 |   1000000 |  1.76s  \n\n**Permutations (n)**\n\n```go\n\nimport \"github.com/digital-technology-agency/math/pkg/combinatorics\"\n\nfunc Example() {\n    n := 4\n    value := combinatorics.PermutationsInt(n)\n\tfmt.Printf(\"Result: %d\", value)\n    /*\n        Result: 24    \n    */ \n}\n```\n\n**Placements (A from n to k)**\n\n```go\n\nimport \"github.com/digital-technology-agency/math/pkg/combinatorics\"\n\nfunc Example() {\n    n := 10\n    k := 10\n    value := combinatorics.PlacementInt(n,k)\n\tfmt.Printf(\"Result: %d\", value)\n    /*\n        Result: 3628800    \n    */ \n}\n```\n\n## Run in Terminal\n\n* Go to main page and click **Releases**\n\n![Card information](./pic/cli-1.png)\n\n* Choose a version for your operating system and click the link\n\n![Card information](./pic/cli-2.png)\n\n* Download and unzip the **math** file\n\n![Card information](./pic/cli-3.png)\n![Card information](./pic/cli-4.png)\n\n* Open terminal in unzip folder\n \n![Card information](./pic/cli-5.png)\n\n* Run unzip binary file  **math** and show list **types**\n\n```bash\n ./math\n```\n\n![Card information](./pic/cli-6.png)\n\n* Comand argument list \n\n```bash\n ./math -h\n```\n\n![Card information](./pic/cli-7.png)\n\n* Set arguments\n```bash\n ./math -n=10000 -k=10\n```\n\n## Contributing\nPull requests and Github issues are welcome.  Please read our [contributing guide](./CONTRIBUTING.md) for more information.\n\n[Агентство цифровых технологий](https://dta.agency/)\n","funding_links":["https://github.com/sponsors/digital-technology-agency"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigital-technology-agency%2Fmath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigital-technology-agency%2Fmath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigital-technology-agency%2Fmath/lists"}