Sets in Mathematics are immutable but in Computer Science sets are mutable and called “Dynamic Sets” – truth of the statement

While reading the classic text Introduction to Algorithms by Cormen et. al. I came across the following claim:

Sets are as fundamental to computer science as they are to mathematics. Whereas mathematical sets are unchanging, the sets manipulated by algorithms can grow, shrink, or otherwise change over time. We call such sets dynamic.

I felt a bit odd after reading the statement that "set" in Mathematics and in CS are different from the mutable point of view. Now in Mathematics what we deal with are theoretical aspect of things and as such "set" is a theoretical concept and so it is in Theoretical CS. If it is immutable in mathematics then so it is in CS. Mathematics and Theoretical CS are interlinked. So given a graph algorithm which say finds the minimum shortest path between a pair of vertices , we can’t say whether it belongs to Mathematics or CS.

Often in algorithms we write statements as :

$ $ S = S \cup \{a\} \quad \text{view $ 1$ }$ $

Which seems to sort of change our set $ S$ , but if we look it in this way:

$ $ S’= S \cup \{a\} \quad \text{view $ 2$ }$ $

$ $ S=S’$ $

So in the second situation we are not modifying our actual set $ S$ we are forming a new set $ S’$ with $ S$ augmented with $ a$ and then after that we are making the variable $ S$ refer to $ S’$ .

What I feel is that the concept of the set being mutable or immutable is solely dependent on the data-structure of representation of the abstract concept of "sets" and since in data-structure the two steps in view $ 2$ are combined and implemented, so they are called dynamic sets.

In short I feel that Dynamic Sets are data-structure implementation of sets and not the abstract sets.

Are called shots actually as powerful as designers believedd them to be?

I have been searching for interesting rules systems to make Pathfinder Combat more interesting in an E6 campaign, more cinematic, and to make classes relying on mundane attacks a bit more powerful. Called Shots seemed like exactly what I needed. Indeed, the effects they can inflict are sometimes actually crippling.

However, I was shocked by the investments required to make use of this mechanic.

  1. Like many mundane mechanics in Pathfinder, it requires two feats to function properly: Improved Called Shots and Greater Called Shots. Yes, Called Shots offer a greater array of available effects than, say, combat maneuvers do, but two feats is still a huge investment. Even for an E6 campaign.
  2. Those feats require Combat Expertise as a feat tax, so Called Shots actually cost three feats to work properly.
  3. Those feats require Int 13, which is not always the best choice for a martial character and doesn’t really make a lot of sense for an aiming feat (Dex 13 would make a lot more sense).
  4. There is a big opportunity cost in making a Called Shot even if you have both related feats. When you decide to make a Called Shot, you accept a huge penalty to your attack roll if you want to achieve anything significant (“Challenging” shots), quite likely just missing your target and achieving nothing at all.
  5. “Easy” shots, on the other hand, don’t threaten your opponent too much.
  6. However, speaking about crits, they are unreliable. Even when you build your character around crits.
  7. Debilitating blows’ effects are mostly amazing, but I plan to use those rules in E6.
  8. Most significant effects achieved by Called Shots allow for a saving throw to partially or fully negate them, to make the feat even more unreliable. At this level, 40 points of damage from a single attack are likely to guarantee this creature dropped within a turn or two, even without any additional debuffs.
  9. Apparently, the designers wanted those rules to be unreliable, because the standard rules make True Strike turn your Called Shot into a normal attack.
  10. If you target touch AC, you lose this benefit when using Called Shots, so Gunslingers and magic users stop being as accurate as they usually are.

In my games, I want to buff Called Shots significantly because they seem to be useless, those feats being trap options. The only possible way to use them now is to take Improved Called Shots, take an Easy Called Shot every time you make a full attack, and just hope for the best (the penalty from the shot will be offset by the bonus from a feat). However, I am not an expert in Pathfinder, so I am asking:

Am I misunderstanding something and underestimating the potential of Called Shots, or are they indeed yet another feat-intensive, trap option present in Pathfinder?

How is a VAS called in which each addition vector has zero sum?

For the purpose of this question, a vector addition system (VAS) is a pair $ (v,A)$ such that there is a dimension $ d\in\mathbb{N}_{>0}$ such that $ A$ is a finite subset of $ \mathbb{Z}^d$ and $ v\in \mathbb{N}_{\ge 0}^d$ .

Consider the set of all VAS $ (v,A)$ such that for the dimension $ d$ of $ (v,A)$ and all vectors $ a\in A$ we have $ \sum_{i<d} a_i=0$ (here, we index components by numbers ranging between 0 and $ d-1$ ). Does this set have an established name? I failed to find any myself.

Variation to spanning tree called Group Spanning Tree

Suppose we have a complete graph with say 100 nodes. We divide the nodes in the graphs into groups for example 10 nodes in each group identified by color. We want to obtain an optimal spanning tree that operates under the constraint that at least one node will be present from each group. The resulting spanning tree can be called a group spanning tree. How to write an efficient algorithm for this making sure it is a tree(no cycles) and not looping over the entire node set on every pass to check presence of cycles and also making sure at least one node from each group is represented.

Why F-bounded polymorphism and F-bounded quantification are called, well, F-bounded

It’s claimed in Wikipedia that:

F-bounded quantification or recursively bounded quantification, introduced in 1989, allows for more precise typing of functions that are applied on recursive types. A recursive type is one that includes a function that uses it as a type for some argument or its return value

Here’s the article which Wikipedia refers to, and F-bounded quantification is introduced in that article in following fashion:

F-bounded quantification is a natural extension of bounded quantification that seems particularly useful in connection with recursive types.

My question is – why though it’s F-bounded, what does “F” stands for in this particular context?

Will anything break if I allow the Warlock pact weapon to be called with a bonus action instead of an action?

I have a Warlock in my group that rarely ever gets his pact blade out, since it takes an action to summon it. Given that drawing a regular weapon doesn’t even take a bonus action, is there anything in the rules that could break if I allow the weapon to be summoned using a bonus action instead?

The use case is to seem as harmless as possible – none of the Warlocks features are openly visible or rely on bulky equipment. But if there is a fight, time is of the essence and wasting a round’s action on calling the weapon seems too ineffective.

How many times in this pseudocode is the function F called?

For this question, I thought function F called twice but it called three times. Are those three functions were called? F(N), F(K) and f(N-1)?

How many times in this pseudocode is the function F called?

Main     Declare K as Integer     K = 3     Set Result = F(K)     Write Result End Program  Function F(N) as Integer         If N == 1 Then Set F = 1     Else         Set F = N * F(N - 1)         Set N = N - 1     End If End Function 

How do I replicate my missiles and follow the player the same as the game called “Go Plane”

enter image description here


I am trying to make a clone of https://play.google.com/store/apps/details?id=io.voodoo.goplane1&hl=en or “Go Plane” and I was wondering how can I follow that kind of missiles where the player can dodge it by moving away from it. Any help? Thanks in Advance! 😀


CODE FOR PLAYER

public float moveSpeed; Rigidbody2D myBody; protected Joystick joystick;  void Start() {     joystick = FindObjectOfType<Joystick>(); }  // Update is called once per frame void Update() {     myBody = GetComponent<Rigidbody2D>();      myBody.velocity = new Vector2(joystick.Horizontal * moveSpeed, joystick.Vertical * moveSpeed); } 

CODE FOR MISSILES

public float acceleration = 1.0f; public float maxSpeed = 5.0f;  public float speed; public float distance;  private Transform Player;  void Start() {     Player = GameObject.FindGameObjectWithTag("Player").GetComponent<Transform>(); } void Update() {     if (Vector3.Distance(transform.position, Player.position) > distance)     {         speed += acceleration * Time.deltaTime;          transform.position = Vector3.MoveTowards(transform.position, Player.position, speed * Time.deltaTime);               if (speed > maxSpeed)             speed = maxSpeed;     } }