Arqade Asked on November 3, 2021
Consider the 3×3 crafting grid. Many recipes, such as placing 4 wooden planks in a 2×2 square, produce a new item as output. Others, such as placing a splash potion of Instant Health 2 by itself in the center of the crafting table, do not produce any output. I’m curious as to what fraction of all possible crafting recipes in the game are currently used, i.e., they cause an item to appear in the 3×3 crafting menu’s output slot.
The number I am looking for is:
p = r/n
Where p is the answer to my question, r is the number of distinct crafting recipes in the game that yield an item, and n is the the total number of possible distinct crafting recipes in the game using all existing items.
I am only interested in the 3×3 crafting menu accessible via the in-game crafting table. Recipes that require a furnace or a brewing stand, for example, do not contribute to the above variables.
To help demonstrate what I’m looking for, imagine that the only items in the entire game are oak planks, crafting tables, oak slabs, and oak stairs. In this case, the answer to this question would be:
n = 59-1 = 1,953,124
r = 4 + 3 + 2 + 1 = 10
p = 10/1,953,124 = 0.000512%
Explanation: each of the crafting table’s 9 slots can have 1 of 5 states: either one of the four items I included in this thought experiment, or empty. We subtract one because the output is assumed to be empty when all slots are empty.
There are 4 recipes which yield a crafting table, 3 which yield slabs, 2 which yield stairs, and 1 which yields a barrel (upcoming in 1.14; you can decide for yourself whether to include items added in 1.14 in your answers).
Note that the recipe for the composter is not included as I am only interested in the Java edition, in which the recipe for the composter requires fences.
If we modify this thought experiment to also include birch planks, slabs, and stairs, the new numbers become:
n = 99-1 = 387,420,488
r = 4*(24) + 2*(3 + 2) + 28 = 330
p = 330/387,420,488 = 0.000085%
Explanation, part 2:
We have added 4 new blocks for a total of 9.
Each of the four blocks used to in the crafting table’s recipe can now be either oak or birch planks. The stairs and slabs cannot mix wood types, so their number of recipes is simply doubled. Each of the 8 blocks (planks and slabs) used in crafting the barrel can also be either oak or birch.
The result will be 0 on any normal calculator. You'll need something like Java's "BigDecimal" to even have a hope of calculating it. And even then it might just be 0.
This question goes way deeper than you probably expect:
So my final answer… doesn't fit into the character limit of a StackExchange answer. And I can't even post it into Pastebin, it's too long for that as well. So I'll round a tiny bit and say that your final value for p
is:
Answered by Fabian Röling on November 3, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP