Finding two nontrivial functional dependencies that follow from F (but are not in F)

Given below is the set F of functional dependencies for the relational schema:

R = {A,B,C,D,E,F,G}.  F = {AB → C,BC → D,G → F,AE → FG} 

Show two nontrivial functional dependencies that follow from F:

Which is :

AB → CD

ABC → D

I don’t know how those two derived from? Could someone walk me through? thanks

Is this an LL(1) grammar? How to solve First – Follow conflict?

im trying to check if this grammar is LL(1).

S -> L = R
L -> * L | id
R -> L | R + R | num

As you can see there is a Left recursion on R production. So i remove that and what i get is:

S -> L = R
L -> * L | id
R -> L R’ | num R’
R’ -> + R R’ | ε

Now the problem that i have is that First and Follow set of R’ rule have a common non-terminal (“+”) and also FIRST(R) and FOLLOW(R’) has a common non-terminal. So i wonder how to create the parsing table if there’s this conflict. My question is: is there a way to solve this problem or simply this isn’t an LL(1) grammar?

Thanks.

Computing FIRST and FOLLOW

Given the following grammar with terminals $ VT=\{[,],a,b,c,+,-\}:$

$ S \rightarrow [SX]|a$

$ X \rightarrow +SY|Yb|\epsilon$

$ Y \rightarrow -SXc|\epsilon$

This should be the FIRST function:

$ first(S) = \{[,a\}$

$ first(X) = \{\epsilon,+,-,b\}$

$ first(Y) = \{\epsilon,-\}$

What would the FOLLOW function be?

Why is FOLLOW not necessary for LL(1) grammars with no $\epsilon$ transitions?

I’m aware of how FIRST and FOLLOW sets are used to construct a parsing table for LL(1) grammars.

However, I’ve encountered this statement from my notes:

With $ \epsilon$ productions in the grammar, we may have to look beyond the current non-terminal to what can come after it

In my opinion, this suggests that FOLLOW is not necessary for LL(1) grammars that have no $ \epsilon$ transition. Am I wrong? And if I’m not, why is this the case?

Thanks

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;     } } 

Follow/ Unfollow BOTS that STILL WORK (in march 2020)

Hi, looking for real user experience with bots that REALLY WORK, now. Instagram shut down on many recently, as far as I know, so it is necessary to ask for your experience. For me it is important to get much follower, so I am looking for bots which can help me with that. So I have a few questions:

1. Now, in march 2020, what do you think which social media platform is best to build followers fast (without extremly much effort)? Still Instagram, as it was earlier (as far as I know), bevor…

Follow/ Unfollow BOTS that STILL WORK (in march 2020)

How can I get Graph edge labels to parallel an edge line or or follow an edge curve?

Edge labels are always rendered horizontally. I would like the label for any straight line edge to be rotated so the bottom of the label’s bounding box is coincident with the edge.

There was an older post (Comfortable Edge Labeling of Undirected Graph) that did this using EdgeRenderingFunction, but that has been superseded by EdgeShapeFunction in v12. EdgeShapeFunction does not have access to the label like EdgeRenderingFunction did.

Labels following a curved edge would be a bonus, but just paralleling a tangent somewhere on the edge would suffice.

Return a ranking points of User follow week, month, year from multiple table with mySQL

Here is the structure of my tables:

User

|--------|------------| | id     | name       | |--------|------------| | 1      | Name1      | | 2      | Name2      | | 3      | Name3      | |--------|------------| 

Post

|--------|------------|-------------|--------------------| | id     | content    | user_id     |   created_at       |  |--------|------------|-------------|--------------------| | 1      | Content1   |  1          |2020-01-17 14:03:31 | | 2      | Content2   |  1          |2020-01-17 16:18:23 | | 3      | Content3   |  2          |2020-01-17 16:29:13 |  |--------|------------|-------------|--------------------| 

Comment

|--------|------------|-------------|----------|---------------------| | id     | comment    | user_id     | post_id  |   created_at        | |--------|------------|-------------|----------|---------------------| | 1      | Comment1   |  1          |   1      | 2020-01-20 18:29:19 | | 2      | Comment2   |  1          |   1      | 2020-01-22 17:25:49 | | 3      | Comment3   |  2          |   2      | 2020-01-28 11:37:59 |  |--------|------------|-------------|----------|---------------------| 

Vote

|--------|-------------|----------|-----------------------| | id     |  user_id    | post_id  |    created_at         | |--------|-------------|----------|-----------------------| | 1      |   1         |   1      | 2020-01-20 15:08:55.0 | | 2      |   1         |   2      | 2020-01-20 15:13:29   | | 3      |   2         |   2      | 2020-01-20 15:13:32   | |--------|-------------|----------|-----------------------| 

I want to find the top score of 10 users by week, month, the year following to formula:

A user creates 1 post will have 10 points. A user creates 1 comment in a post that will have 5 points. A user votes in a post that will have 2 points. Could anyone help me with this, please!

Thank you so much.

Can a long rest immediately follow a short rest to attune to an item?

A situation recently came up in my weekly game where a PC who had just discovered a new magic item after a series of encounters took a short rest to identify the magic item’s properties. Per the DMG, this is all that is needed to identify a magic item’s properties so there’s nothing wrong with that.

The magic item required attunement, so I told him it was useless to him until he attuned with it. He asked for the rules on attunement and I told him it requires another short rest. No further short rests came up during that adventuring day, so the party decided to set up camp.

The question came up, “Can I attune during a long rest?”

I determined based on the following excerpt from the DMG that the answer to that question is no:

Attunement
Some magic items require a creature to form a bond with them before their magical properties can be used. This bond is called attunement…
Attuning to an item requires a creature to spend a short rest focused on only that item while being in physical contact with it (this can’t be the same short rest used to learn the item’s properties). This focus can take the form of weapon practice (for a weapon), meditation (for a wondrous item), or some other appropriate activity. If the short rest is interrupted, the attunement attempt fails. Otherwise, at the end of the short rest, the creature gains an intuitive understanding of how to activate any magical properties of the item, including any necessary command words…
(emphases mine)

So, naturally, the player said, “Okay, I take a short rest just before the long rest.”

Something about this really doesn’t sit well with me but I can’t find a reason in the rules for not allowing this. Obviously it’s not the intended usage of rests (short or long) based on the adventuring day, but I really didn’t have any good rationale behind disallowing the short-then-long rest.

For reference, I have included the pertinent rules relating to short rests and long rests below.

Short Rest
A short rest is a period of downtime, at least 1 hour long, during which a character does nothing more strenuous than eating, drinking, reading, and tending to wounds…

Long Rest
A long rest is a period of extended downtime, at least 8 hours long, during which a character sleeps or performs light activity: reading, talking, eating, or standing watch for no more than 2 hours. A character can’t benefit from more than one long rest in a 24-hour period…