Consider the 3x3 crafting grid. Many recipes, such as placing 4 wooden planks in a 2x2 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 3x3 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 3x3 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.