Determine third normal form in case of two functional dependencies

Assume I’m given an entity E which has attributes A, B and C, (each of them is a candidate key, but let’s say I can introduce some EID that serves as a PK) with functional dependencies: A determines C and B determines C. How would I get this into a third normal form?

I have tried the following:

E(EID(PK), AID(FK), BID(FK)) A(AID(PK), C) B(BID(PK), C) 

but in this representation, I’m have the attribute C twice in my database. Can anyone advise on a more appropriate way of getting into a third normal form?

Dot Product doesn’t behave like normal function

I am trying to slightly modify the Dot function by treating it like a usual function, but soon I notice something weird about it.

Suppose there is a set set = {λ}, and I want to force Dot[a, λ] (having two arguments) to just print out {a, λ}.

set = {λ};  Unprotect[Dot]; Clear[Dot] Dot[x_, λ_] := Module[{}, Print[{x, λ}]] /; MemberQ[set, λ] Unprotect[Dot];  (* test *) Dot[a, λ] Dot[a, b, λ]  

The two tests print out

{a,λ} 

and

{b, λ} {a.b, λ} 

respectively.

However, the same code for a different function Dott behave completly differently,

set = {λ}; Dott[x_, λ_] :=   Module[{}, Print[{x, λ}]] /; MemberQ[set, λ]  (* tests *) Dott[a, λ] Dott[a, a, λ] 

where the two tests print out {a,λ} and an unevaluated expression Dott[a, a, λ] respectively, and as expected.

I wonder what is going on under the hood (it appears that Dot is trying to exhaust all possible "two-factor product" given any number of dotted factors), and how to properly temper with the Dot product? (my ultimate goal is to adapt it for some non-commutative algebra).

Does “Magic Weapon, Legion’s” affect the monk’s unarmed strikes as the normal “Magic Weapon” does?

"Magic Weapon, Legion’s", states the following (emphasis mine):

This spell functions like magic weapon (see page 251 of the Player’s Handbook), except as noted above and as follows. It affects only weapons held by allies when the spell is cast. It has no effect on ammunition.

and "Magic Weapon" states the following:

You can’t cast this spell on a natural weapon, such as an unarmed strike (instead, see magic fang). A monk’s unarmed strike is considered a weapon, and thus it can be enhanced by this spell.

Therefore, does the Legion’s version also consider the monk’s unarmed strikes are weapons held or not?

Can the alarm spell be detected by mundane means such as a normal perception check?

The alarm spell in the players handbook reads as follows:

You set an alarm against unwanted intrusion. Choose a door, a window, or an area within range that is no larger than a 20-foot cube. Until the spell ends, an alarm alerts you whenever a Tiny or larger creature touches or enters the warded area. When you cast the spell, you can designate creatures that won’t set off the alarm. You also choose whether the alarm is mental or audible. A mental alarm alerts you with a ping in your mind if you are within 1 mile of the warded area. This ping awakens you if you are sleeping. An audible alarm produces the sound of a hand bell for 10 seconds within 60 feet

Are there any examples in officially published modules or rulings, errata etc. that indicate whether the alarm spell is visible via a perception check vs the spells DC or whether the spell is invisible and must be detected through a spell such as detect magic or find traps?

How do you resolve the damage and effects of Eldritch Claw Tattoo’s “Eldritch Maul” ability on a hit that is beyond your weapon’s normal melee range?

The Eldritch Maul ability says:

each of your melee attacks with a weapon or an unarmed strike can reach a target up to 15 feet away from you, as inky tendrils launch toward the target. In addition, your melee attacks deal an extra 1d6 force damage on a hit.

So, let’s say that I’m using the Eldritch Maul ability with a normal shortsword to melee attack a target that is 15 feet away. Is it only the inky tendrils that hit the target, dealing just 1d6 force damage, or should I also factor in the 1d6+STR/DEX piercing damage of the shortsword as if it hit the target as well?

Follow-up question: If the weapon was magical, would its magical properties factor into the attack?

For example: Would your attack with the Eldritch Maul ability benefit from a +1 weapon?

In another example: Would a Dagger of Venom’s poison property proc on a melee hit from 15 feet away while using the Eldritch Maul ability?

Dagger of Venom says:

You can use an action to cause thick, black poison to coat the blade. The poison remains for 1 minute or until an attack using this weapon hits a creature.

Rendering overlapping normal map textures to a 2d scene efficiently

I am using modern OpenGL to render a 2D non grid/tiled world map. I’ve generated some simple normal map textures to render over the base world map to provide terrain elevation/detail shading. Terrain is not tiled (triangulated from noise), so the majority of these terrain elevation features can overlap. This is good as it gives a more continuous appearance to mountains etc.

However the normal map shader needs to sample the base terrain color and apply the lighting value to it before returning the output color. So I can’t render two overlapping normal textures without the second ‘cutting out’ the first where they overlap (the second texture render cannot see the output of the first).

My solution to this was to use a 3 pass render to texture via FBO. I attempt to divide the normal textures destination locations into 3 non overlapping groups and render 1 group in each pass. This works to a point, but of course where a texture overlaps more than 3 neighbours the cut out problem remains.

I could just increase the number of passes/groups to 4, 5, 6… and perhaps this will resolve most cut out issues. While this would probably still provide reasonable performance on my system I am guessing there is a limit where integrated graphics cards may struggle.

Is there an alternative solution for this that could scale better to lower end systems? Or is perhaps even a 5 or 6 pass full-screen render viable on even integrated graphics these days?

Note:

The first render pass draws the entire 2D scene (minus terrain shading) and is obviously the slowest, but it happens only once. The remaining passes make a screen size copy of the previous pass to a second texture (rendering to a screen sized quad) and then render normal textures to this copy using the first texture as input. Adding more passes would only repeat the screen sized texture copy and normal texture rendering.

If a thrown weapon has only normal range, does it have unlimited range? [duplicate]

As i was reading the Soulknife Rogue feature "Psychic Blades" from Tasha’s Cauldron of Everything:

…This magic blade is a simple melee weapon with the finesse and thrown properties. It has a normal range of 60 feet and no long range, and on a hit, it deals psychic damage equal to 1d6 plus the ability modifier you used for the attack roll. The blade vanishes immediately after it hits or misses its target, and it leaves no mark on its target if it deals damage.

Following that, i look at the PHB for the rules on range for weapons:

A weapon that can be used to make a ranged attack has a range shown in parentheses after the ammunition or thrown property. The range lists two numbers. The first is the weapon’s normal range in feet, and the second indicates the weapon’s long range. When attacking a target beyond normal range, you have disadvantage on the attack roll. You can’t attack a target beyond the weapon’s long range.

So, the psychic blades from the Soulknife have unlimited range but with disadvantage or only can attack on the normal range?