Define a function then define it's 'type'












0














I've been asked to define a function getEmployees that maps each role into the set of names who have that role within a business. I need to define both the type and mapping of this function.



So say I have a few sets - {Checkout}, {Manager}, {Shelf Stacker}, and say I have one name in each, maybe {John Doe} intersects both {Checkout} and {Shelf Stacker}.



I'm just a bit confused with what is meant by type, I thought they may mean to write the function, map it, and state whether it's surjective, injective etc?



I've just been told "no that's not the case..but I'm not saying any more!"



Could someone please help me try to figure this out? Or point me in the right direction? I'm lost!










share|cite|improve this question






















  • Are you sure that your question is about Matehmatics?
    – Tito Eliatron
    Nov 29 at 19:56










  • @TitoEliatron Discrete Maths within Comp Sci - sorry for the grey area
    – CerKL
    Nov 29 at 20:00
















0














I've been asked to define a function getEmployees that maps each role into the set of names who have that role within a business. I need to define both the type and mapping of this function.



So say I have a few sets - {Checkout}, {Manager}, {Shelf Stacker}, and say I have one name in each, maybe {John Doe} intersects both {Checkout} and {Shelf Stacker}.



I'm just a bit confused with what is meant by type, I thought they may mean to write the function, map it, and state whether it's surjective, injective etc?



I've just been told "no that's not the case..but I'm not saying any more!"



Could someone please help me try to figure this out? Or point me in the right direction? I'm lost!










share|cite|improve this question






















  • Are you sure that your question is about Matehmatics?
    – Tito Eliatron
    Nov 29 at 19:56










  • @TitoEliatron Discrete Maths within Comp Sci - sorry for the grey area
    – CerKL
    Nov 29 at 20:00














0












0








0







I've been asked to define a function getEmployees that maps each role into the set of names who have that role within a business. I need to define both the type and mapping of this function.



So say I have a few sets - {Checkout}, {Manager}, {Shelf Stacker}, and say I have one name in each, maybe {John Doe} intersects both {Checkout} and {Shelf Stacker}.



I'm just a bit confused with what is meant by type, I thought they may mean to write the function, map it, and state whether it's surjective, injective etc?



I've just been told "no that's not the case..but I'm not saying any more!"



Could someone please help me try to figure this out? Or point me in the right direction? I'm lost!










share|cite|improve this question













I've been asked to define a function getEmployees that maps each role into the set of names who have that role within a business. I need to define both the type and mapping of this function.



So say I have a few sets - {Checkout}, {Manager}, {Shelf Stacker}, and say I have one name in each, maybe {John Doe} intersects both {Checkout} and {Shelf Stacker}.



I'm just a bit confused with what is meant by type, I thought they may mean to write the function, map it, and state whether it's surjective, injective etc?



I've just been told "no that's not the case..but I'm not saying any more!"



Could someone please help me try to figure this out? Or point me in the right direction? I'm lost!







functions






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Nov 29 at 19:49









CerKL

1




1












  • Are you sure that your question is about Matehmatics?
    – Tito Eliatron
    Nov 29 at 19:56










  • @TitoEliatron Discrete Maths within Comp Sci - sorry for the grey area
    – CerKL
    Nov 29 at 20:00


















  • Are you sure that your question is about Matehmatics?
    – Tito Eliatron
    Nov 29 at 19:56










  • @TitoEliatron Discrete Maths within Comp Sci - sorry for the grey area
    – CerKL
    Nov 29 at 20:00
















Are you sure that your question is about Matehmatics?
– Tito Eliatron
Nov 29 at 19:56




Are you sure that your question is about Matehmatics?
– Tito Eliatron
Nov 29 at 19:56












@TitoEliatron Discrete Maths within Comp Sci - sorry for the grey area
– CerKL
Nov 29 at 20:00




@TitoEliatron Discrete Maths within Comp Sci - sorry for the grey area
– CerKL
Nov 29 at 20:00










1 Answer
1






active

oldest

votes


















1














Let $E$ denote the set of employees and $R$ the set of roles, and $X$ the set of ordered pairs $(e,,r)$ with $ein E,,rin R$ such that $e$ has role $r$. The getEmployees method is $rmapsto{ein E|(e,,r)in X}$. Similarly, a getRoles method would be $emapsto{rin R|(e,,r)in X}$.






share|cite|improve this answer





















  • Thanks for this! I was tripping up over the method, could you please help me figure out what they might mean by "define the type" though?
    – CerKL
    Nov 29 at 20:15










  • @CerKL Presumably the types of an employee are that employee's roles. The term "type" in this context might have meant the type of a variable in programming, e.g. List<Role> or any number of similar things in C#.
    – J.G.
    Nov 29 at 20:18













Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3019108%2fdefine-a-function-then-define-its-type%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Let $E$ denote the set of employees and $R$ the set of roles, and $X$ the set of ordered pairs $(e,,r)$ with $ein E,,rin R$ such that $e$ has role $r$. The getEmployees method is $rmapsto{ein E|(e,,r)in X}$. Similarly, a getRoles method would be $emapsto{rin R|(e,,r)in X}$.






share|cite|improve this answer





















  • Thanks for this! I was tripping up over the method, could you please help me figure out what they might mean by "define the type" though?
    – CerKL
    Nov 29 at 20:15










  • @CerKL Presumably the types of an employee are that employee's roles. The term "type" in this context might have meant the type of a variable in programming, e.g. List<Role> or any number of similar things in C#.
    – J.G.
    Nov 29 at 20:18


















1














Let $E$ denote the set of employees and $R$ the set of roles, and $X$ the set of ordered pairs $(e,,r)$ with $ein E,,rin R$ such that $e$ has role $r$. The getEmployees method is $rmapsto{ein E|(e,,r)in X}$. Similarly, a getRoles method would be $emapsto{rin R|(e,,r)in X}$.






share|cite|improve this answer





















  • Thanks for this! I was tripping up over the method, could you please help me figure out what they might mean by "define the type" though?
    – CerKL
    Nov 29 at 20:15










  • @CerKL Presumably the types of an employee are that employee's roles. The term "type" in this context might have meant the type of a variable in programming, e.g. List<Role> or any number of similar things in C#.
    – J.G.
    Nov 29 at 20:18
















1












1








1






Let $E$ denote the set of employees and $R$ the set of roles, and $X$ the set of ordered pairs $(e,,r)$ with $ein E,,rin R$ such that $e$ has role $r$. The getEmployees method is $rmapsto{ein E|(e,,r)in X}$. Similarly, a getRoles method would be $emapsto{rin R|(e,,r)in X}$.






share|cite|improve this answer












Let $E$ denote the set of employees and $R$ the set of roles, and $X$ the set of ordered pairs $(e,,r)$ with $ein E,,rin R$ such that $e$ has role $r$. The getEmployees method is $rmapsto{ein E|(e,,r)in X}$. Similarly, a getRoles method would be $emapsto{rin R|(e,,r)in X}$.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Nov 29 at 19:53









J.G.

22.3k22034




22.3k22034












  • Thanks for this! I was tripping up over the method, could you please help me figure out what they might mean by "define the type" though?
    – CerKL
    Nov 29 at 20:15










  • @CerKL Presumably the types of an employee are that employee's roles. The term "type" in this context might have meant the type of a variable in programming, e.g. List<Role> or any number of similar things in C#.
    – J.G.
    Nov 29 at 20:18




















  • Thanks for this! I was tripping up over the method, could you please help me figure out what they might mean by "define the type" though?
    – CerKL
    Nov 29 at 20:15










  • @CerKL Presumably the types of an employee are that employee's roles. The term "type" in this context might have meant the type of a variable in programming, e.g. List<Role> or any number of similar things in C#.
    – J.G.
    Nov 29 at 20:18


















Thanks for this! I was tripping up over the method, could you please help me figure out what they might mean by "define the type" though?
– CerKL
Nov 29 at 20:15




Thanks for this! I was tripping up over the method, could you please help me figure out what they might mean by "define the type" though?
– CerKL
Nov 29 at 20:15












@CerKL Presumably the types of an employee are that employee's roles. The term "type" in this context might have meant the type of a variable in programming, e.g. List<Role> or any number of similar things in C#.
– J.G.
Nov 29 at 20:18






@CerKL Presumably the types of an employee are that employee's roles. The term "type" in this context might have meant the type of a variable in programming, e.g. List<Role> or any number of similar things in C#.
– J.G.
Nov 29 at 20:18




















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3019108%2fdefine-a-function-then-define-its-type%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Wiesbaden

To store a contact into the json file from server.js file using a class in NodeJS

Marschland