convex polytopes – Distance to the “boundary” of a polyhedral complex

Suppose I have a polyhedral complex ${P_1, ldots, P_k}$ and let $S := cup_{i = 1}^k P_i$. I am interested in a function which measures the distance from a point $x in S$ to the “boundary” of my polyhedral complex, in other words the lower dimensional faces. More precisely, if $x in text{int}(P_i)$ for some $i$ then my function should return the distance from $x$ to the boundary of $P_i$. Otherwise, $x$ lies on a lower dimensional face and the function should return $0$.

Is there a name for this function? Has it appeared in the literature and been studied before? I’m also wondering if it has any special properties beyond simply being a distance function to a non-convex set. Thanks in advance!

Is it possible to emulate common polyhedral dice rolls using just a d6, and if so how?

This is a question that I have asked myself several times, but I have never obtained a really satisfactory result.

The problem is this: Suppose we only have one or more d6 dice (possibly the most common type of dice outside of the pen and paper), but we still want to play D&D 5e or another RPG. The game doesn't really matter here, we just have to be able to emulate different types of dice, like d4, d8, d10, d12 or d20. I suppose that if it is possible to calculate these dice from the rolls of a d6, any other potentially necessary dice rolls can also be calculated in a similar way.

So: How can you emulate the probability results of a d4, d6, d8, d10, d12, and d20 rolling only with a d6?

convex polytopes: deciding whether a subspace intersects with an open polyhedral cone

I am trying to answer the following question:

Leave $ V = text {span} (v_1, …, v_k) subseteq mathbb {R} ^ n $, where $ v_1, …, v_k $ It can be assumed orthonormal. Leave $ C = {x in mathbb {R} ^ n: x ^ Tu_i <0, i = 1, …, N } $ be an open polyhedral cone where $ u_1, …, u_N in mathbb {R} ^ n $ They are given. Suppose we have $ v_1, …, v_k $ Y $ u_1, …, u_N $ in hand, how do we decide if $ V cap C = varnothing $ or not?

This is what I tried:

My first approach is to use the separation theorem to try to transform the problem into a standard linear viability problem:
$ V cap C = varnothing $ If and only if $ exist y in mathbb {R} ^ n $ such that
$$
y ^ T (r_1v_1 + cdots + r_kv_k) geq 0, forall (r_1, …, r_k) in mathbb {R} ^ k text {y}
$$

$$
y ^ Tx <0, forall x: x ^ Tu_i <0, i = 1, …, N.
$$

Written more compactly, $ V cap C = varnothing $ If and only if $ exist y in mathbb {R} ^ n $ such that
$$
(i) y ^ TA_V z geq 0, forall z = (z_1, …, z_k) ^ T in mathbb {R} ^ k text {, y}
$$

$$
(ii) y ^ Tx <0, forall x in mathbb {R} ^ n: Ux <0, i = 1, …, N
$$

where $ A_V $ is the $ n times k $ matrix with $ v_1, …, v_k $ like its columns and $ U $ is the $ N times n $ matrix with $ v_1, …, u_N $ as its rows (i) can be treated "sufficiently" considering only $ z = e_1, …, e_k, e_1 + … + e_k $ since they cover positively $ mathbb {R} ^ k $. About (ii), to replace the infinitely many $ x $ finely many $ x $, I would need the extreme rays of $ C $I don't know how to find. But, even if I find these extreme rays, the problem will only become "similar" to the linear feasibility problem. "With some $ <$ conditions ", which I still don't know how to treat completely.

My second approach is simply consider $ V ^ perp $, the orthogonal complement of $ V $. We can use the Gram-Schmidt process to generate an orthonormal basis for $ V ^ perp $tell $ w_1, …, w_ {n-k} $. Leave $ W $ be the $ (n-k) times n $ matrix with $ w_1, …, w_ {n-k} $ as their ranks and $ U $ be the $ N times n $ matrix with $ u_1, …, u_N $ like their ranks then $ V cap C = varnothing $ yes and only if the system
$$
Wx = 0
$$

$$
Ux <0
$$

$$
s.t. x in mathbb {R} ^ n
$$

It has no solution. Again, I don't know how to deal with "$ <$"in $ Ux <0 $.

Sorry for my long paragraph that describes my attempts. Here are my questions:

(1) For a polyhedral cone described by $ C = {x in mathbb {R} ^ n: x ^ Tu_i <0, i = 1, …, N } $ with $ u_i $ known, $ i = 1, …, N $Are there simple algorithms or analytical formulas to find their extreme rays?
(2) In the restrictions of a "linear program", if there are any restrictions with "$ <$" instead of "$ leq $"How do I deal with them?

Any ideas, reference books or documents are welcome and appreciated. Thank you.