Checking to see if my relation is in 3NF based on the functional dependencies

I have a relation, called Score (which stores scores of football games), and it has the following functional dependencies for its various attributes G, H, T, S, W, D, and O (representing GameID, HomeOrAway, TeamID, Season, Week, Date, and Outcome):


SD → W


D → SW

I would like to know if Score is in 3NF, or if not, suggest a decomposition that achieves 3NF. Can you guys help me go about figuring this out? I know that for each functional dependency, I need to check that the left side contains a key for Score, but I’m not sure how to really go about doing that. Any help would be greatly appreciated!

Checking if a $k$-subset of a graph is a vertex cover in time $O(kn)$

Given a graph $ G=(V,E)$ with $ |V|=n,|E|=m$ . I am reading a $ \textit{brute force}$ solution to determining whether each candidate vertex cover of size $ k \leq n$ is a vertex cover. The graph does not have loops.

As per page 2 of the notes here we have:

  • 1) $ C(n,k) = O(n^k)$ $ k$ -subsets of $ V$
  • 2) $ O(kn)$ time to check whether a subset is a vertex cover

I am considering 2).

What I would think of would be to take each edge in our graph, for which there is a maximum of $ {n \choose 2} = O(n^2)$ , and check the candidate subset to see if at least one of the vertices is an endpoint of the edge, which would take $ O(kn^2)$ checks.

I am not sure how the author arrived at $ O(kn)$ operations, any insights appreciated.

ECMA script for checking active workflows for an list item

Hi i am having more than 1 workflow associated with the list if there is any workflow that is active for an item then i need to prevent starting another workflow for the same item. I am using the following code to achieve the same. Can anyone please provide me the ECMA client script object model equivalent for achieving the same.

//Check for any active workflows for the document     private void CheckForActiveWorkflows()     {         // Parameters 'List' and 'ID' will be null for site workflows.         if (!String.IsNullOrEmpty(Request.Params["List"]) && !String.IsNullOrEmpty(Request.Params["ID"]))         {             this.workflowList = this.Web.Lists[new Guid(Request.Params["List"])];             this.workflowListItem = this.workflowList.GetItemById(Convert.ToInt32(Request.Params["ID"]));          }         SPWorkflowManager manager = this.Site.WorkflowManager;         SPWorkflowCollection workflowCollection = manager.GetItemActiveWorkflows(this.workflowListItem);         if (workflowCollection.Count > 0)             SPUtility.TransferToErrorPage("An workflow is already running for the document. Kindly complete it before starting a new workflow");     } 

What are the difference and relation between type checking and type reconstruction?

In Types and Programming Languages by Pierce,

ML-style let-polymorphism was first described by Milner (1978). A num- ber of type reconstruction algorithms have been proposed, notably the clas- sic Algorithm W (Damas and Milner) of Damas and Milner (1982; also see Lee and Yi, 1998). The main difference between Algorithm W and the pre- sentation in this chapter is that the former is specialized for “pure type reconstruction”—assigning principal types to completely untyped lambda- terms—while we have mixed type checking and type reconstruction, permit- ting terms to include explicit type annotations that may, but need not, contain variables. This makes our technical presentation a bit more involved (espe- cially the proof of completeness, Theorem 22.3.7, where we must be careful to keep the programmer’s type variables separate from the ones introduced by the constraint generation rules), but it meshes better with the style of the other chapters.

What are the difference and relation between type checking and type reconstruction?

Does type checking apply only to terms with explicit type annotations which don’t contain type variables?

Does type reconstruction apply only to terms either without explicit type annotations, or with explicit type annotations containing type variables?


A problem has occured when checking for updates – 16.04

There’s red circle with white minus sign in the middle that says that a problem has occured when checking for updates. I’m also unable to open “Software & Updates” and “Software Center”. I have tried uninstalling and reinstalling the software-center, but it gives me this error when I try to open the software-center via terminal.

File "/usr/bin/software-center", line 140     print time.time()              ^ SyntaxError: invalid syntax 

Appears to python2 code. Is it using python3 to interpret?

when i tried software-properties-gtk

it gave me this

  File "/usr/bin/software-properties-gtk", line 32, in <module>     import aptsources   File "/usr/lib/python3/dist-packages/aptsources/", line 3, in <module>     import apt_pkg ModuleNotFoundError: No module named 'apt_pkg' 

regression DNN: gradient checking doesn’t match with backpropagation derivatives

I think the problem lies within a bad implementation of back propagation, it’s the only way i could explain this (gradient checking that doesn’t match backprop derivatives), but i’m not able to find any error, and derivatives are ok to me, so i ask you if the derivatives i compute make sense, or there is some error.

About DNN:

I built a 3 layer (1 input, 1 hidden, 1 output) neural network. My goal was regression, so the last layer has 1 neuron, and I used leakyRelu as activation function on the hidden layer, and no activation function on the output layer. I used Mean Squared Error (MSE) as cost function. I also used normalization, and i didn’t use regularization yet.

About derivatives:

dCost/dALayerOutput = d( 1/m * sum( (ALayerOutput – y)^2 ) )/dALayerOutput = 2/m * (ALayerOutput – y) = dA

dCost/DZLayerOutput = dA * dALayerOutput/dZLayerOutput = dA * d(ZLayerOutput) = dA * 1 = dZ (because i don’t apply any activation function to the last layer).

dCost/DWeightOutput = dZ * dZLayerOutput/dWeightOutput = dZ * d(WeightOutput * ALayerHidden + BiasOutput)/dWeightOutput = dZ * ALayerHidden = dW

dCost/DBiasOutput = dZ * dZLayerOutput/dBiasOutput = dZ * d(WeightOutput * ALayerHidden + BiasOutput)/dBiasOutput = dZ * 1 = dZ = dB

dCost/DALayerHidden = dZ * dZLayerOutput/dALayerHidden = dZ * d(WeightOutput * ALayerHidden + BiasOutput)/dALayerHidden = dZ * WeightOutput = dA-1

dCost/dZLayerHidden = dA-1 * dALayerHidden/dZLayerHidden = d( leakyRelu(ZLayerHidden) )/dZLayerHidden = dA-1 * dLeakyRelu(dZLayerHidden) = dZ-1

dCost/dWeightHidden = dZ-1 * dZLayerHidden/dWeightHidden = dZ-1 * d(WeightHidden * LayerInput + BiasHidden)/dWeightHidden = dZ-1 * LayerInput = dW-1

dCost/dBiasHidden = dZ-1 * d(WeightHidden * LayerInput + BiasHidden)/dBiasHidden = dZ-1 * 1 = dB-1

About Gradient Descent:

netWeightsLayerOutput = netWeightsLayerOutput – (learningRate * dW)

netWeightsLayerHidden = netWeightsLayerHidden – (learningRate * dW-1)

netBiasesLayerOutput = netBiasesLayerOutput – (learningRate * dB)

netBiasesLayerHidden = netBiasesLayerHidden – (learningRate * dB-1)

Did you find any error?

How to fix “no backend found for spell checking” in Kate editor settings?

I have installed Kate editor into my Ubuntu MATE 16.04.6 LTS system as simple as sudo apt-get install kate.

In its Settings → Configure Kate, Editor Component, Editing, Spellcheck tab I see that it does not detect back-end for spell-checking:

No backend found for spell checking Configure - Kate

$   kate Sonnet: No speller backends available! No language dictionaries for the language: "en" 

I have the following packages installed related to spell-check:

$   dpkg -l | grep -iE "dict|spell.*(check|correct)" ii  anthy                                                       9100h-25ubuntu1                                 amd64        input method for Japanese - backend, dictionary and utility ii  anthy-common                                                9100h-25ubuntu1                                 all          input method for Japanese - common files and dictionary ii  aspell                                                      0.60.7~20110707-3build1                         amd64        GNU Aspell spell-checker ii  aspell-en                                                   7.1-0-1.1                                       all          English dictionary for GNU Aspell ii  dictionaries-common                                         1.26.3                                          all          spelling dictionaries - common utilities ii  enchant                                                     1.6.0-10.1build2                                amd64        Wrapper for various spell checker engines (binary programs) ii  geany-plugin-spellcheck                                     1.27+dfsg-2                                     amd64        spellcheck plugin for Geany ii  hunspell-en-ca                                              1:5.1.0-1ubuntu2.2                              all          English (Canada) dictionary for hunspell ii  hunspell-en-gb                                              1:5.1.0-1ubuntu2.2                              all          English (GB) dictionary for hunspell ii  hunspell-en-us                                              20070829-6ubuntu3                               all          English_american dictionary for hunspell ii  hunspell-en-za                                              1:5.1.0-1ubuntu2.2                              all          English (South Africa) dictionary for hunspell ii  hunspell-ru                                                 20120501-1                                      all          Russian dictionary for hunspell ii  iamerican                                                   3.4.00-5                                        all          American English dictionary for ispell (standard version) ii  ienglish-common                                             3.4.00-5                                        all          Common files for British and American ispell dictionaries ii  ispell                                                      3.4.00-5                                        amd64        International Ispell (an interactive spelling corrector) ii  libaspell15:amd64                                           0.60.7~20110707-3build1                         amd64        GNU Aspell spell-checker runtime library ii  libenchant1c2a:amd64                                        1.6.0-10.1build2                                amd64        Wrapper library for various spell checker engines (runtime libs) ii  libgdict-common                                             3.18.0-2                                        all          GNOME Dictionary base library - common files ii  libgtkspell0                                                2.0.16-1.1ubuntu1                               amd64        a spell-checking addon for GTK's TextView widget ii  libgtkspell3-3-0:amd64                                      3.0.7-2                                         amd64        spell-checking addon for GTK+'s TextView widget ii  libhunspell-1.3-0:amd64                                     1.3.3-4ubuntu1                                  amd64        spell checker and morphological analyzer (shared library) ii  libhunspell-dev:amd64                                       1.3.3-4ubuntu1                                  amd64        spell checker and morphological analyzer (development) ii  libjazzy-java                                               0.5.2-1                                         all          spell checker java library ii  libkf5sonnet5-data                                          5.18.0-0ubuntu1                                 all          spell checking library for Qt ii  libkf5sonnetcore5:amd64                                     5.18.0-0ubuntu1                                 amd64        spell checking library for Qt ii  libkf5sonnetui5:amd64                                       5.18.0-0ubuntu1                                 amd64        spell checking library for Qt ii  libmatedict6                                                1.12.0-1                                        amd64        MATE desktop utilities (matedict library) ii  link-grammar-dictionaries-en                                4.7.4-3                                         all          Carnegie Mellon University's link grammar parser (English dictionary) ii  myspell-en-au                                               2.1-5.4                                         all          English_australian dictionary for myspell ii  myspell-en-gb                                               1:5.1.0-1ubuntu2.2                              all          English (GB) dictionary for hunspell - dummy transitional package ii  myspell-en-za                                               1:5.1.0-1ubuntu2.2                              all          English (ZA) dictionary for hunspell - dummy transitional package rc  myspell-ru                                                  0.99g5-20                                       all          Russian dictionary for MySpell ii  python-enchant                                              1.6.6-2                                         all          spellchecking library for Python ii  python3-enchant                                             1.6.6-2                                         all          spellchecking library for Python 3 ii  wamerican                                                   7.1-1                                           all          American English dictionary words for /usr/share/dict ii  wbritish                                                    7.1-1                                           all          British English dictionary words for /usr/share/dict   

How should I fix this?