Skip to content

TypeScript implementation of the Vsauce paperclip experiment.

License

Notifications You must be signed in to change notification settings

GirkovArpa/zipf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Zipf

Link random pairs of paperclips in a pool then observe the distribution of chain lengths.

Does it follow Zipf's Law?

Inspired by this Vsauce video.

Usage

Since this is a TypeScript project, you can run it immediately without manual compilation using Deno:

$ deno run zipf.ts
const pool: number[][] = linkRandPairs(10, 5); 
const result: number[] = pool.map(toLength).sort(numerically);
console.log({ result });
// { result: [ 1, 1, 1, 2, 5 ] }

About

TypeScript implementation of the Vsauce paperclip experiment.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published