The translation makes factorization/primality amenable to simple depth first graph coloring with 4 colors. I am mostly just wondering if it has been done before. There are zero computational breakthroughs with the translation that I am able to perceive. Eulerian tours maybe…

# Tag: Coloring

## 2013 – Steps in a Process & Coloring them (SP2013)

I came across an example of a process with a current stage image (should be attached to the thread).

Basically there would be 4 or 5 stages: Initial / Assigned / Being Processed / Completed.

Each of the stages would have (almost like a flowchart diagram) a progress image with an arrow showing the current state and they would be colored.

For example:

Current Stage – White box / Green Outline

Completed Stage – Green Box / Black Outline

Pending – Yellow Box / Gold Outline

Cancelled – Red Box / Red Outline

etc.

As the list item gets updated, the workflow images would get marked and colored for the stages.

How could this be accomplished? Would it be as simple as having a column for each stage? And if so then would the coloring of each stage come from CSS?

Thanks

## I will draw you with comic or anime style for $10

#### I will draw you with comic or anime style

Hello there!

I am very fascinated to finish your concept, color your artwork, lineart your sketch, or anything about illustration. I will do my best so that you are satisfied with the results of my work. When you order from me, you also have the right to resell my service.

If you have anything to ask about price or anything else feel free to DM me, I will glad to answer all of your questions. Letâ€™s discuss your project together and achieve the goals that we made.

Thanks for coming

.

## how would i go about coloring marching cubes terrain?

i’m making a game with marching cubes terrain (i know very original idea) and i don’t exactly know how to color it i have a system to do it i just need to know how to interpolate it where its not all smoothed out i just want flat colors i think i boils down to this function

this is this guys code http://www.paulbourke.net/geometry/polygonise/

```
glm::vec3 VertexInterp(const float& isolevel,const glm::vec3& p1,const glm::vec3& p2, const float& valp1, const float& valp2) {
float mu;
glm::vec3 p;
if (ABS(isolevel-valp1) < 0.00001)
return(p1);
if (ABS(isolevel-valp2) < 0.00001)
return(p2);
if (ABS(valp1-valp2) < 0.00001)
return(p1);
mu = (isolevel - valp1) / (valp2 - valp1);
p.x = p1.x + mu * (p2.x - p1.x);
p.y = p1.y + mu * (p2.y - p1.y);
p.z = p1.z + mu * (p2.z - p1.z);
return p;
}
```

so if anyone could help me a flater variant of that function it would be very much appreciated

(i know all the rest of the things i need to do i just need help with this)

## graph theory – Coloring of Regions Formed by a Loop in the Plane

## The Claim

Suppose $gamma : (0,1) to mathbb{R}^2$ is a $C^1$ curve in the plane such that

- $gamma(0) = gamma(1)$
- $gamma'(t) > 0$ for all $t in (0,1)$
- $gamma^{-1}(p)$ contains at most $2$ elements for all $p in mathbb{R}^2$.

Then $gamma$ divides the plane into regions that can be colored with $2$ colors in such a way that adjacent regions do not have the same color.

## Attempts at a Proof

This is presented as an elementary exercise in a textbook, but it’s not obvious to me at all.

I tried to recast this as a graph theory problem, with the regions acting as vertices which are connected by an edge only if the regions are adjacent. After looking at a few examples, a proof didn’t suggest itself to me.

I then tried to really use hypotheses 2 and 3 on $gamma$. To me, what these hypotheses imply is that whenever $gamma$ intersects itself, it does so by crossing itself. Moreover, when it crosses itself, it does so in such a way that the region it enters into is split into a well-defined left (in the direction of motion) part and right part. My idea was then to just color the left part one color and the right part the other color. However, this coloring doesn’t actually work out. You’ll sometimes color one region both colors according to this rule.

I tried variations on the previous idea but didn’t get anywhere, at which point I decided to make this post.

## dag – edge coloring a directed acyclic graph

I have an edge coloring problem as follows:

Suppose we have a DAG which has a source vertex s and an end vertex e, in addition, all the paths from s to e are of the same length say L. We define L colors from 1 to L. Is there an efficient edge coloring algorithm to color all the edges, such that every path from s to e uses all the L colors and every path must be labeled differently? I attach a picture below for illustration, where vertex 1 is s, vertex 10 is e.

## complexity theory – Polynomial kernelization for “Set coloring” problem

Given an universum $U$ and a system of its subsets $Fsubseteq mathcal{P}(U)$, given a $kin mathbb{Z}_{geq 0}$. The decision problem is to say whether there exists a $2$-coloring of $U$ s.t. atleast $k$ sets from $F$ contain elements of both colors.

I wish to show that there exists kernel with $2k$ sets and $|U|in O(k^2)$. So far I have these reduction rules:

**Rule 1:** If there is $xin U$ s.t. there’s no $Win F$ s.t. $xin W$, then we can delete $x$ from U and work with a new instance. $(F,Usetminus{x},k)$.

**Rule 2:** If $Win F$ is a singleton, then we can remove it and work with $(Fsetminus {W},U,K)$ because such $W$ will never contain two elements of different colors.

**Rule 3:** If $Vin F$ is s.t. $|V|geq 2$ and $Vcap W$ is empty for each other $Win F$, then we can color elements in $V$ somehow to satisfy the distinctness and we can lower $k$ by one.

Not really sure how to proceed from here. Any hints appreciated.

## combinatorics – How to correctly enumerate all the schemes of this hexahedral coloring problem?

Choose several colors from the given six different colors to dye six faces of a cube, and dye each two faces with common edges into different colors. How many different dyeing schemes are there?

*Note: if we dye two identical cubes, we can make the six corresponding faces of the two cubes dyed the same by proper flipping, then we say that the two cubes have the same dyeing scheme.*

```
Show(Graphics3D(
Rotate(Cuboid({0, 0, 0}, {1, 2, 1}), 0 Degree, {0, 0, 1}),
Axes -> True), i = 1;
Graphics3D(
Table(Text(Style(ToString(i++), 15), {x, y, z}), {x, 0, 1}, {y, 0,
2, 2}, {z, 0, 1})))
```

```
g0 = Graph((Sort /@
Flatten(Map(Thread(#((1)) (UndirectedEdge) #((2))) &,
{{1, {2, 3, 5}},
{2, {1, 4, 6}},
{3, {1, 4, 7}},
{4, {2, 3, 8}},
{5, {1, 6, 7}},
{6, {2, 5, 8}},
{7, {3, 5, 8}},
{8, {4, 6, 7}}}))) // DeleteDuplicates,
VertexLabels -> "Name");
ChromaticPolynomial(g0, 6)
poly = CycleIndexPolynomial(DihedralGroup(8),
Array(Subscript(a, ##) &, 6))
```

The result of the above code is `198030`

, but the reference answer is `230`

. How to correctly list all the solutions to this problem?

## proof theory – Computational practicality of proving a theorem by transforming into a map coloring and finding $P(3)$, where $P$ is the chromatic polynomial

So I have heard that you can transform a math statement into a map in such a way that proving the statement is true is equivalent to finding a $3$-coloring of that map.

I’m also aware that you can take any map and apply an algorithm to determine its chromatic polynomial, and so you can just plug in $3$ to determine if $3$-colorings exist.

So it seems like you can prove any statement in this way: convert to a map, find the chromatic polynomial, then plug in $3$. I also know that since this is basically an NP problem, this is not always computationally feasible. However, I have never before seen what one of these maps would look like or what this process entails, so I was wondering just in a general sense if there are any particular applications where this method could be practical or feasible. For instance, are there certain types of mathematical statements that translate into compositions of basic classes of graphs in a way that makes it extremely easy and fast to find its chromatic polynomial?

## Graph Coloring Algorithm – Computer Science Stack Exchange

I have a simple graph G = (V,E) and each vertex has a range (a,b).Every two vertices are connected only if (a_1,b_1) and (a_2,b_2) have a common subrange.

Each range of vertex is rV1 = (0,5) rV2 = (1,3) rV3 = (2,10)

rV4 = (4,9) rV5 = (6,7) rV6 = (8,12) rV7 = (11,13)

Graph Created based on above ranges.

Based on the algorithm below i have to color the graph.

```
ranges = rV1,rV2,rV3,rV4,rV5,rV6,rV7...
COLOR_INTERVAL_GRAPH(rV1,rV2,rV3,rV4,rV5,rV6,rV7...){
if(number of rVi > 0){
C_m = MAXIMAL_COLOR_CLASS(rV1,rV2,rV3,rV4,rV5,rV6,rV7...);
//paint C_m vertices with color m.
//new_ranges <- remove C_m from rV1,rV2,rV3,rV4,rV5,rV6,rV7...
return {C_m} U COLOR_INTERVAL_GRAPH(new_ranges)
else:
return ()
MAXIMAL_COLOR_CLASS(new_range){
C = ()
i = 1
while(i <= new_range.size()){
C = C U {Vi}
j = i+1
while(j <= new_range.size() AND rVi (not common subrange with rVj)){
j = j+1
i=j
return C
```

Question 1: Is the algortihm greedy, and used it to color the graph given above.

Answer 1: The algorithm has the ‘greedy choice property’ since it paints the most each turn, by choosing the best solution to the current subproblem without caring about future problems or backtracking. (Is my reasoning correct?).

Graph Colored (Is the graph colored correctly?).

Question 2: Prove using induction that the algorithm uses the fewest possible colors.

Answer 2: The MAXIMAL_COLOR_CLASS function in line 4 extends the C set.I have to prove that the optimum coloring of any graph (of this type) can be transformed in order the first chromatic class is the same as the output of MAXIMAL_COLOR_CLASS.

Then using the above (by induction) i can show that every optimum coloring is the same as the output of the MAXIMAL_COLOR_CLASS proving the algorithm correct. Not sure how to use induction to prove that.

Question 3: Convert the algorithm from recursive to iterative form.

Answer 3: MAXIMAL_COLOR_CLASS stays the same, the COLOR_INTERVAL_GRAPH is transformed to:

```
COLOR_INTERVAL_GRAPH(ranges){
m=1
while(ranges.size() > 0){
C_m = MAXIMAL_COLOR_CLASS(ranges)
matrix <- C_m + "," + m //meaning ((1,5,6),1) ((2,4,7),2) ((3),3) in the example above
sequence = remove the C_m vertices from sequence //(sequence - C_m)
m = m + 1
}return matrix
```

Question 4: Instead of MAXIMAL_COLOR_CLASS now the algorith uses FIRST_LAST_CLASS which outputs a set of vertices that has the vertex with the smallest starting range and the vertex with the biggest ending range (remember (start,end)), where the last is not crossing the first. Show an example where this form of algorithm uses more colors than needed.

Answer 4: In the graph given above this algorithm needs 4 or 5 colors since each C set can have at most 2 colors, however we know the graph can be colored using 3 colors instead. (Is my reasoning correct?).